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
f2c648f0
Commit
f2c648f0
authored
Feb 23, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
9991952f
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
87 additions
and
21 deletions
+87
-21
feedingBlanking.vue
Html/src/view/fml/operation_manage/feedingBlanking.vue
+6
-4
lineMonitor.vue
Html/src/view/fml/statistical_analysis/lineMonitor.vue
+1
-1
taskList.vue
Html/src/view/fml/statistical_analysis/taskList.vue
+22
-8
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+24
-1
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+13
-5
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+1
-0
QmsCheckController.cs
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
+9
-1
AutoMES.cs
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
+2
-0
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+1
-0
ResponseAutomationTasklist.cs
...ayer.AccRepository/Response/ResponseAutomationTasklist.cs
+2
-0
ResponseLoadStation.cs
...er.Middlelayer.Repository/Response/ResponseLoadStation.cs
+6
-1
No files found.
Html/src/view/fml/operation_manage/feedingBlanking.vue
View file @
f2c648f0
...
...
@@ -32,7 +32,7 @@
{{
item
.
status
==
1
?
"待上料"
:
orderDetail
.
status
==
2
:
item
.
status
==
2
?
"运行中"
:
"待下料"
}}
...
...
@@ -92,7 +92,7 @@
?
"执行中"
:
orderDetail
.
status
==
3
?
"执行完毕"
:
"
未下发
"
:
""
}}
</span>
</p>
<p
class=
"flex"
>
...
...
@@ -194,7 +194,7 @@
?
"执行中"
:
orderDetail2
.
status
==
3
?
"执行完毕"
:
"
未下发
"
:
""
}}
</span>
</p>
<p
class=
"flex"
>
...
...
@@ -403,6 +403,7 @@ export default {
this
.
sectionid
=
this
.
stationList
[
index
].
section
;
this
.
orderDetail
=
{};
this
.
code
=
""
;
// status = 2;
// if (status == 3) {
// this.attr1 = true;
...
...
@@ -449,6 +450,7 @@ export default {
getWorkOrderInfo
()
{
let
data
=
{
code
:
this
.
code
,
section
:
this
.
sectionid
};
this
.
request
(
"/acc/AutomationOperate/ScanCode"
,
data
,
"get"
)
.
then
((
res
)
=>
{
...
...
@@ -625,7 +627,7 @@ export default {
if
(
this
.
locationobj
.
id
)
{
// this.getRunningDetail();
this
.
request
(
"/acc/AutomationOperate/ScanCode?id="
+
this
.
locationobj
.
id
,
"/acc/AutomationOperate/ScanCode?id="
+
this
.
locationobj
.
id
+
"§ion="
+
this
.
sectionids
,
""
,
"get"
)
...
...
Html/src/view/fml/statistical_analysis/lineMonitor.vue
View file @
f2c648f0
...
...
@@ -187,7 +187,7 @@ export default {
},
{
title
:
"最后更新时间"
,
key
:
"
workpiece_sn
"
,
key
:
"
lastupdate
"
,
},
],
data1
:
[],
...
...
Html/src/view/fml/statistical_analysis/taskList.vue
View file @
f2c648f0
...
...
@@ -193,7 +193,7 @@ export default {
params
.
index
+
(
this
.
page
-
1
)
*
this
.
pagesize
+
1
);
},
width
:
7
0
,
width
:
5
0
,
},
{
title
:
"任务编号"
,
...
...
@@ -203,48 +203,55 @@ export default {
{
title
:
"产线层级"
,
key
:
"section"
,
width
:
1
5
0
,
width
:
1
7
0
,
},
{
title
:
"触发方"
,
key
:
"trigger"
,
width
:
100
,
},
{
title
:
"任务类型"
,
key
:
"tasktype"
,
width
:
100
,
},
{
title
:
"工件编号"
,
key
:
"sn"
,
width
:
15
0
,
width
:
23
0
,
},
{
title
:
"工单编号"
,
key
:
"ordernumber"
,
width
:
100
,
},
{
title
:
"产品编号"
,
key
:
"productCode"
,
width
:
130
,
},
{
title
:
"工序编号"
,
key
:
"routeNo"
,
},
//
{
//
title: "工序编号",
//
key: "routeNo",
//
},
{
title
:
"工序名称"
,
key
:
"route"
,
width
:
90
,
},
{
title
:
"程序号"
,
key
:
"program"
,
},
{
title
:
"储位
位置
"
,
title
:
"储位"
,
key
:
"location"
,
width
:
70
,
},
{
title
:
"工装编号"
,
key
:
"fixtureCode"
,
width
:
160
,
},
{
title
:
"动作"
,
...
...
@@ -256,6 +263,11 @@ export default {
key
:
"actionType"
,
},
{
title
:
"下发状态"
,
key
:
"send"
,
width
:
100
,
},
{
title
:
"状态"
,
key
:
"status"
,
render
:
(
h
,
params
)
=>
{
...
...
@@ -280,10 +292,12 @@ export default {
{
title
:
"触发时间"
,
key
:
"triggerTime"
,
width
:
160
,
},
{
title
:
"完成时间"
,
key
:
"complatetime"
,
width
:
160
,
},
],
data1
:
[],
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
f2c648f0
...
...
@@ -308,6 +308,9 @@ namespace Siger.ApiACC.Controllers
// 业务入口: 上料位-》 入库 如果是上料工装 安装完成 ,绑定 储位与装配
if
(
sectionProperty
.
propertytype
==
1
)
{
//上下料位状态 为后台控制
var
machineStatusObj
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
var
download
=
false
;
if
(
sectionProperty
.
down
>
2
)
{
...
...
@@ -347,6 +350,20 @@ namespace Siger.ApiACC.Controllers
location
.
status
=
(
int
)
LocationStatus
.
Out
;
_automationLocation
.
Update
(
location
);
if
(
machineStatusObj
!=
null
)
{
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
_automationMachineStatus
.
Update
(
machineStatusObj
);
}
}
//需要抽检时(准备下料) ,立库到抽检台
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
)
{
if
(
machineStatusObj
!=
null
)
{
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
_automationMachineStatus
.
Update
(
machineStatusObj
);
}
}
//上料中
...
...
@@ -375,6 +392,8 @@ namespace Siger.ApiACC.Controllers
//抽检台
if
(
sectionProperty
.
propertytype
==
3
)
{
var
machineStatusObj
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
)
{
location
.
status
=
(
int
)
LocationStatus
.
Out
;
...
...
@@ -382,7 +401,11 @@ namespace Siger.ApiACC.Controllers
}
if
(
taskObj
.
action
==
TaskAction
.
Step_CJT_SXLW
)
{
if
(
machineStatusObj
!=
null
)
{
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
_automationMachineStatus
.
Update
(
machineStatusObj
);
}
}
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
f2c648f0
...
...
@@ -82,7 +82,7 @@ namespace Siger.ApiACC.Controllers
//上下料
if
(
type
==
0
)
{
var
sectionProperty
=
_sectionPropertyRepository
.
GetList
(
f
=>
f
.
propertytype
==
1
);
var
sectionProperty
=
_sectionPropertyRepository
.
GetList
(
f
=>
f
.
propertytype
==
1
)
.
ToList
()
;
var
sections
=
sectionProperty
.
Select
(
s
=>
s
.
sectionid
).
ToList
();
var
levelSection
=
_sigerProjectLevelSection
.
GetList
(
f
=>
f
.
parentid
==
line
&&
sections
.
Contains
(
f
.
id
));
if
(!
levelSection
.
Any
())
...
...
@@ -92,11 +92,15 @@ namespace Siger.ApiACC.Controllers
var
result
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
lv
in
levelSection
)
{
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
lv
.
id
);
var
_property
=
sectionProperty
.
Find
(
f
=>
f
.
sectionid
==
lv
.
id
);
result
.
Add
(
new
ResponseLoadStation
{
section
=
lv
.
id
,
status
=
1
,
status
=
machineStatus
!=
null
?
machineStatus
.
status
:
1
,
title
=
lv
.
title
,
upload
=
_property
!=
null
?
_property
.
upload
:
0
,
download
=
_property
!=
null
?
_property
.
down
:
0
,
});
}
...
...
@@ -229,6 +233,7 @@ namespace Siger.ApiACC.Controllers
return
new
ImportObjectResult
((
int
)
CommonEnum
.
Fail
,
message
);
}
taskobj
.
send
=
1
;
taskobj
.
actiontype
=
ExcueType
.
Manual
;
_automationTaskList
.
Update
(
taskobj
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
...
...
@@ -277,8 +282,9 @@ namespace Siger.ApiACC.Controllers
/// <param name="id"></param>
/// <returns></returns>
[
HttpGet
]
public
IActionResult
ScanCode
(
string
code
,
int
id
)
public
IActionResult
ScanCode
(
string
code
,
int
id
,
int
section
)
{
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
section
);
if
(!
string
.
IsNullOrEmpty
(
code
))
{
var
result
=
_automationFixtureToolsProduct
.
GetPlanFixtureInfo
(
ProjectId
,
code
);
...
...
@@ -288,6 +294,7 @@ namespace Siger.ApiACC.Controllers
}
var
sn
=
_automationTaskList
.
CreateRandonSn
(
result
.
ProductCode
);
result
.
Sn
=
sn
;
result
.
status
=
monitor
!=
null
?
monitor
.
status
:
1
;
return
new
ObjectResult
(
result
);
}
if
(
id
==
0
)
...
...
@@ -296,7 +303,7 @@ namespace Siger.ApiACC.Controllers
}
//下料
var
unload
=
_automationFixtureToolsProduct
.
GetPlanFixtureInfoByLocation
(
ProjectId
,
id
);
unload
.
status
=
monitor
!=
null
?
monitor
.
status
:
1
;
return
new
ObjectResult
(
unload
);
}
...
...
@@ -638,6 +645,7 @@ namespace Siger.ApiACC.Controllers
fixturename
=
location
.
fixturename
,
locationid
=
location
.
locationid
,
productcode
=
location
.
productcode
,
productname
=
location
.
productname
,
processid
=
0
,
programnumber
=
""
,
remark
=
lineMode
.
inspect
==
1
?
"准备下料-》抽检台"
:
"准备下料"
,
...
...
@@ -678,7 +686,7 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
AccEnum
.
MachineOnFree
);
}
if
(
upload
.
down
!=
2
)
if
(
upload
.
down
<
2
)
{
throw
new
BadRequestException
(
AccEnum
.
TaskProcessing
);
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
f2c648f0
...
...
@@ -82,6 +82,7 @@ namespace Siger.ApiACC.Controllers
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
machineStatus
=
d
.
status
;
item
.
status
=
fixture
.
status
;
item
.
lastupdate
=
fixture
.
createtime
.
ToString
();
}
result
.
Add
(
item
);
...
...
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
View file @
f2c648f0
...
...
@@ -21,6 +21,7 @@ using System.IO;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Common.ModuleEnum
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
namespace
Siger.ApiACC.Controllers
{
...
...
@@ -267,10 +268,17 @@ namespace Siger.ApiACC.Controllers
try
{
//还有未完成任务 退出 等待任务下发
if
(!
_automationTaskList
.
CanTask
(
ProjectId
,
req
.
sectionid
))
//if (!_automationTaskList.CanTask(ProjectId, req.sectionid))
//{
// return new ObjectResult(CommonEnum.Succefull);
//}
var
lastTask
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
ProjectId
,
"id"
,
true
).
FirstOrDefault
();
if
(
lastTask
.
extend1
==
section
.
ToStr
()
&&
lastTask
.
action
==
TaskAction
.
Step_CJT_SXLW
&&
lastTask
.
status
!=
(
int
)
TaskResultStatus
.
Complated
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
CreateTaskList
(
req
.
sectionid
,
req
.
productid
,
product
.
code
,
req
.
sn
,
req
.
routeid
.
ToInt
());
AddSnList
(
req
.
materialid
.
ToInt
(),
inspection
,
product
.
code
,
section
.
parentid
);
//把二维码插入到 sn_list表
}
...
...
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
View file @
f2c648f0
...
...
@@ -11,6 +11,7 @@ using System;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
namespace
Siger.ApiACC.Tasks
{
...
...
@@ -87,6 +88,7 @@ namespace Siger.ApiACC.Tasks
return
;
}
task
.
send
=
1
;
task
.
actiontype
=
ExcueType
.
Auto
;
if
(!
dbhelper
.
UpdateTask
(
task
))
{
Logger
.
WriteLineError
(
$"更新TASK 下发状态失败"
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
f2c648f0
...
...
@@ -233,6 +233,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponsePlanlFixtureInfo
{
OrderNumber
=
d
.
OrderNumber
,
ProductName
=
p
.
product_name
,
Url
=
pd
.
image
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationTasklist.cs
View file @
f2c648f0
...
...
@@ -47,5 +47,7 @@ namespace Siger.Middlelayer.AccRepository.Response
public
DateTime
?
complatevalue
{
get
;
set
;
}
public
string
complatetime
{
get
;
set
;
}
public
int
send
{
get
;
set
;
}
//0 自动,1,手动执行
public
int
excute
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.Repository/Response/ResponseLoadStation.cs
View file @
f2c648f0
...
...
@@ -20,8 +20,13 @@ namespace Siger.Middlelayer.Repository.Response
public
int
status
{
get
;
set
;
}
/// <summary>
///
1 :可以上料 2:可以下料
///
上料状态
/// </summary>
public
int
upload
{
get
;
set
;
}
/// <summary>
/// 下料状态
/// </summary>
public
int
download
{
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