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
c5e9044f
Commit
c5e9044f
authored
Mar 25, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixedbug
parent
ca993c8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
14 deletions
+47
-14
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+12
-0
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+16
-10
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+16
-3
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
c5e9044f
...
@@ -341,6 +341,18 @@ namespace Siger.ApiACC.Controllers
...
@@ -341,6 +341,18 @@ namespace Siger.ApiACC.Controllers
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
_automationMachineStatus
.
Update
(
machineStatusObj
);
_automationMachineStatus
.
Update
(
machineStatusObj
);
}
}
if
(!
monitors
.
Any
())
{
//上下料位置监控清除
var
upDownMonitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
extend1
.
ToInt
());
if
(
upDownMonitor
!=
null
)
{
_automationFixtureMonitor
.
Delete
(
upDownMonitor
);
}
}
}
}
////从立库储位拿SN 工件到上料位
////从立库储位拿SN 工件到上料位
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
c5e9044f
...
@@ -306,6 +306,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -306,6 +306,10 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
FixtureOrderNulll
);
throw
new
BadRequestException
(
AccEnum
.
FixtureOrderNulll
);
}
}
var
machineStaus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
section
);
var
machineStaus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
section
);
if
(
machineStaus
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineOnFree
);
}
if
(
machineStaus
.
status
==(
int
)
Automation
.
MachineStatus
.
Produce
)
if
(
machineStaus
.
status
==(
int
)
Automation
.
MachineStatus
.
Produce
)
{
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
...
@@ -570,15 +574,21 @@ namespace Siger.ApiACC.Controllers
...
@@ -570,15 +574,21 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
TaskCreateDone
);
throw
new
BadRequestException
(
AccEnum
.
TaskCreateDone
);
}
}
upload
.
down
+=
1
;
upload
.
updatetime
=
DateTime
.
Now
;
_sectionPropertyRepository
.
Update
(
upload
);
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
id
==
unloading
.
id
);
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
id
==
unloading
.
id
);
if
(
location
==
null
)
if
(
location
==
null
)
{
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
//if (location.sn==upload.extend1)
//{
// throw new BadRequestException(AccEnum.SnDownloading);
//}
upload
.
down
+=
1
;
upload
.
updatetime
=
DateTime
.
Now
;
upload
.
extend1
=
location
.
sn
;
_sectionPropertyRepository
.
Update
(
upload
);
if
(
string
.
IsNullOrEmpty
(
location
.
sn
))
if
(
string
.
IsNullOrEmpty
(
location
.
sn
))
{
{
throw
new
BadRequestException
(
AccEnum
.
LocationNoSn
);
throw
new
BadRequestException
(
AccEnum
.
LocationNoSn
);
...
@@ -882,7 +892,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -882,7 +892,7 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
ReplaceSn
);
throw
new
BadRequestException
(
AccEnum
.
ReplaceSn
);
}
}
upload
.
down
-=
1
;
upload
.
upload
+=
1
;
upload
.
upload
+=
1
;
upload
.
updatetime
=
DateTime
.
Now
;
upload
.
updatetime
=
DateTime
.
Now
;
_sectionPropertyRepository
.
Update
(
upload
);
_sectionPropertyRepository
.
Update
(
upload
);
...
@@ -926,10 +936,6 @@ namespace Siger.ApiACC.Controllers
...
@@ -926,10 +936,6 @@ namespace Siger.ApiACC.Controllers
extend1
=
assemble
.
section
.
ToStr
()
extend1
=
assemble
.
section
.
ToStr
()
});
});
monitor
.
taskno
=
taskNo
;
monitor
.
sn
=
assemble
.
sn
;
_automationFixtureMonitor
.
Update
(
monitor
);
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
{
Logger
.
WriteLineError
(
$"安装完成任务
{
taskNo
}
创建成功-
{
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
Logger
.
WriteLineError
(
$"安装完成任务
{
taskNo
}
创建成功-
{
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
c5e9044f
...
@@ -210,16 +210,18 @@ namespace Siger.ApiACC.Controllers
...
@@ -210,16 +210,18 @@ namespace Siger.ApiACC.Controllers
{
{
foreach
(
var
perperty
in
_property
)
foreach
(
var
perperty
in
_property
)
{
{
if
(
perperty
.
upload
>
0
)
//上料
if
(
perperty
.
upload
>
0
&&
perperty
.
down
==
0
)
{
{
//重置上料位状态
//重置上料位状态
if
(
record
.
sectionid
==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_LK_SXLW
)
if
(
record
.
sectionid
==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_LK_SXLW
)
{
{
perperty
.
upload
-=
1
;
perperty
.
upload
-=
1
;
_automationSectionProperty
.
Update
(
perperty
);
_automationSectionProperty
.
Update
(
perperty
);
}
}
}
}
if
(
perperty
.
down
>
0
)
//下料
if
(
perperty
.
down
>
0
&&
perperty
.
upload
==
0
)
{
{
//重置下料位置
//重置下料位置
...
@@ -234,6 +236,17 @@ namespace Siger.ApiACC.Controllers
...
@@ -234,6 +236,17 @@ namespace Siger.ApiACC.Controllers
//取消拆卸完成
//取消拆卸完成
}
}
//下料 并上料 (同一托盘更新工件)
if
(
perperty
.
upload
>
0
&&
perperty
.
down
>
0
)
{
//重置上料位
if
(
record
.
extend1
.
ToInt
()
==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_SXLW_LK
)
{
perperty
.
upload
-=
1
;
_automationSectionProperty
.
Update
(
perperty
);
}
}
}
}
}
}
...
...
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
c5e9044f
...
@@ -365,8 +365,10 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -365,8 +365,10 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"该工单对应当前工装产品不一致"
)]
[
Description
(
"该工单对应当前工装产品不一致"
)]
FixtureDiff
,
FixtureDiff
,
[
Description
(
"请更换工件"
)]
[
Description
(
"请更换工件"
)]
ReplaceSn
ReplaceSn
,
[
Description
(
"该工件正在下料中"
)]
SnDownloading
,
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
{
{
...
...
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