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
5515680f
Commit
5515680f
authored
Mar 23, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate laisi NewFunction
parent
b41b80f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+22
-8
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+2
-0
requestAutoLoad.cs
...iger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
+5
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
5515680f
...
...
@@ -835,7 +835,10 @@ namespace Siger.ApiACC.Controllers
[
HttpPost
]
public
IActionResult
DisassembleAndAssemble
([
FromBody
]
RequestDissasembleAndLoad
assemble
)
{
if
(
string
.
IsNullOrEmpty
(
assemble
.
sn
))
{
throw
new
BadRequestException
(
AccEnum
.
SNInvalidte
);
}
var
invenProperty
=
_sectionPropertyRepository
.
Get
(
f
=>
f
.
propertytype
==
5
);
if
(
invenProperty
==
null
)
{
...
...
@@ -846,7 +849,6 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
AccEnum
.
Station_Null
);
}
if
(
upload
.
upload
>
0
)
{
throw
new
BadRequestException
(
AccEnum
.
Uploading
);
...
...
@@ -855,16 +857,27 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
AccEnum
.
Downloading
);
}
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
projectId
==
ProjectId
&&
f
.
section
==
assemble
.
section
);
if
(
monitor
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
if
(
assemble
.
sn
==
monitor
.
sn
)
{
throw
new
BadRequestException
(
AccEnum
.
ReplaceSn
);
}
upload
.
down
-=
1
;
upload
.
upload
+=
1
;
upload
.
updatetime
=
DateTime
.
Now
;
_sectionPropertyRepository
.
Update
(
upload
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
projectId
==
ProjectId
&&
f
.
section
==
assemble
.
section
);
if
(
monitor
==
null
)
//上料 指定的第一道工序
var
route
=
_productRoute
.
GetList
(
f
=>
f
.
productId
==
monitor
.
productId
&&
f
.
status
==
(
int
)
RowState
.
Valid
,
"serialNumber"
,
false
).
FirstOrDefault
();
if
(
route
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
ProductRouteMissing
);
}
//检测工序是否配置正确
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
...
...
@@ -884,7 +897,7 @@ namespace Siger.ApiACC.Controllers
projectId
=
ProjectId
,
productid
=
monitor
.
productId
,
productname
=
monitor
.
productName
,
sn
=
monitor
.
sn
,
sn
=
assemble
.
sn
,
ordercode
=
monitor
.
ordernumber
,
fixtureguid
=
monitor
.
fixtureguid
,
fixturename
=
monitor
.
fixturename
,
...
...
@@ -893,11 +906,12 @@ namespace Siger.ApiACC.Controllers
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-下料并安装完成"
,
route
=
monitor
.
route
,
route
=
route
.
id
,
//第一道工序
extend1
=
assemble
.
section
.
ToStr
()
});
monitor
.
taskno
=
taskNo
;
monitor
.
sn
=
assemble
.
sn
;
_automationFixtureMonitor
.
Update
(
monitor
);
if
(
_unitOfWork
.
Commit
()
>
0
)
...
...
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
5515680f
...
...
@@ -364,6 +364,8 @@ namespace Siger.Middlelayer.Common.ModuleEnum
TaskCreateDone
,
[
Description
(
"该工单对应当前工装不一致"
)]
FixtureDiff
,
[
Description
(
"请更换工件"
)]
ReplaceSn
}
public
enum
SeriNumCfg
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
View file @
5515680f
...
...
@@ -53,5 +53,10 @@ namespace Siger.Middlelayer.AccRepository.Request
{
public
int
section
{
get
;
set
;
}
public
string
code
{
get
;
set
;
}
/// <summary>
/// 新工件SN
/// </summary>
public
string
sn
{
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