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
b2e971e0
Commit
b2e971e0
authored
Jan 28, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
bb18f836
048d2734
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
216 additions
and
12 deletions
+216
-12
feedingBlanking.vue
Html/src/view/fml/operation_manage/feedingBlanking.vue
+22
-2
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+1
-1
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+7
-2
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+162
-3
DictKeyValConst.cs
...ommon/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
+5
-0
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+7
-2
IAutomationLocationRepository.cs
...y/Repositories/Interface/IAutomationLocationRepository.cs
+7
-1
requestAutoLoad.cs
...iger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
+2
-0
No files found.
Html/src/view/fml/operation_manage/feedingBlanking.vue
View file @
b2e971e0
...
@@ -116,7 +116,13 @@
...
@@ -116,7 +116,13 @@
<div
class=
"flex"
>
<div
class=
"flex"
>
<p
class=
"infoLabel"
>
产品图片:
</p>
<p
class=
"infoLabel"
>
产品图片:
</p>
<div>
<div>
<img
:src=
"axios.publicPath+orderDetail.url"
alt=
""
style=
"width:100%"
/>
<img
:src=
"
axios.publicPath + orderDetail.url
"
alt=
""
style=
"width: 100%"
/>
</div>
</div>
</div>
</div>
<div>
<div>
...
@@ -137,6 +143,8 @@
...
@@ -137,6 +143,8 @@
:columns=
"columns2"
:columns=
"columns2"
:max-height=
"200"
:max-height=
"200"
style=
"width: 500px"
style=
"width: 500px"
highlight-row
@
on-current-change=
"handleRowChange1"
></Table>
></Table>
</div>
</div>
<div>
<div>
...
@@ -326,6 +334,7 @@ export default {
...
@@ -326,6 +334,7 @@ export default {
detailobj
:
{},
detailobj
:
{},
sectionid
:
0
,
sectionid
:
0
,
tabindex
:
"1"
,
tabindex
:
"1"
,
locationobj
:{}
};
};
},
},
created
()
{
created
()
{
...
@@ -390,7 +399,7 @@ export default {
...
@@ -390,7 +399,7 @@ export default {
},
},
//获取储位
//获取储位
getStorages
()
{
getStorages
()
{
this
.
request
(
"/acc/AutomationLocation/GetLocationList"
,
""
,
"get"
)
this
.
request
(
"/acc/AutomationLocation/GetLocationList
?fillsn=1
"
,
""
,
"get"
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
.
data
.
data
);
console
.
log
(
res
.
data
.
data
);
if
(
res
.
data
.
ret
==
1
)
{
if
(
res
.
data
.
ret
==
1
)
{
...
@@ -500,8 +509,13 @@ export default {
...
@@ -500,8 +509,13 @@ export default {
this
.
$Message
.
error
(
"请选择工位"
);
this
.
$Message
.
error
(
"请选择工位"
);
return
false
;
return
false
;
}
}
if
(
!
this
.
locationobj
.
id
)
{
this
.
$Message
.
error
(
"请选择储位"
);
return
false
;
}
let
data
=
{
let
data
=
{
section
:
this
.
sectionid
,
section
:
this
.
sectionid
,
id
:
this
.
locationobj
.
id
,
};
};
this
.
request
(
"/acc/AutomationOperate/Unloading"
,
data
,
"post"
).
thne
(
this
.
request
(
"/acc/AutomationOperate/Unloading"
,
data
,
"post"
).
thne
(
(
res
)
=>
{
(
res
)
=>
{
...
@@ -539,6 +553,12 @@ export default {
...
@@ -539,6 +553,12 @@ export default {
this
.
orderDetail
.
fixtureGuid
=
this
.
detailobj
.
fixtureguid
;
this
.
orderDetail
.
fixtureGuid
=
this
.
detailobj
.
fixtureguid
;
this
.
orderDetail
.
location
=
this
.
detailobj
.
locationid
;
this
.
orderDetail
.
location
=
this
.
detailobj
.
locationid
;
},
},
handleRowChange1
(
currentRow
,
oldCurrentRow
)
{
console
.
log
(
currentRow
);
this
.
locationobj
=
currentRow
;
this
.
orderDetail
.
fixtureGuid
=
this
.
detailobj
.
fixtureguid
;
this
.
orderDetail
.
location
=
this
.
detailobj
.
locationid
;
},
request
(
url
,
data
,
type
)
{
request
(
url
,
data
,
type
)
{
if
(
type
==
"get"
)
{
if
(
type
==
"get"
)
{
return
this
.
axios
return
this
.
axios
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
b2e971e0
...
@@ -428,7 +428,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -428,7 +428,7 @@ namespace Siger.ApiACC.Controllers
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
}
}
//优先级3:其他设备下料 (加工中心 ->
立库
)
//优先级3:其他设备下料 (加工中心 ->
清洗机
)
if
(
cleanMachine
!=
null
)
if
(
cleanMachine
!=
null
)
{
{
var
fullMachine
=
machineStatusList
.
FirstOrDefault
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
);
var
fullMachine
=
machineStatusList
.
FirstOrDefault
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
);
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
b2e971e0
...
@@ -345,10 +345,15 @@ namespace Siger.ApiACC.Controllers
...
@@ -345,10 +345,15 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
/// <summary>
///
/// </summary>
/// <param name="fillsn">0:全部 1: 储位有SN</param>
/// <returns></returns>
[
HttpGet
]
[
HttpGet
]
public
IActionResult
GetLocationList
()
public
IActionResult
GetLocationList
(
int
fillsn
=
0
)
{
{
return
new
ObjectResult
(
_autoLocationRepository
.
GetDataList
(
ProjectId
).
ToList
());
return
new
ObjectResult
(
_autoLocationRepository
.
GetDataList
(
ProjectId
,
fillsn
).
ToList
());
}
}
}
}
}
}
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
b2e971e0
...
@@ -21,6 +21,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum;
...
@@ -21,6 +21,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum;
using
Siger.Middlelayer.Common.Configuration
;
using
Siger.Middlelayer.Common.Configuration
;
using
Siger.Middlelayer.Common.Helpers
;
using
Siger.Middlelayer.Common.Helpers
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
NPOI.SS.Formula
;
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
{
{
...
@@ -452,7 +453,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -452,7 +453,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
}
//移出 上料位
//移出 上料位
monitor
.
s
tatus
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
monitor
.
s
ection
=
0
;
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
{
...
@@ -500,8 +501,109 @@ namespace Siger.ApiACC.Controllers
...
@@ -500,8 +501,109 @@ namespace Siger.ApiACC.Controllers
[
HttpPost
]
[
HttpPost
]
public
IActionResult
Unloading
([
FromBody
]
requestAutomationUnloading
unloading
)
public
IActionResult
Unloading
([
FromBody
]
requestAutomationUnloading
unloading
)
{
{
//var monitor = _automationFixtureMonitor.Get(f => f.section == unloading.section);
//if (monitor == null)
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
//if (string.IsNullOrEmpty( monitor.sn))
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控SN信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
locationid
==
unloading
.
locationid
);
if
(
location
==
null
)
{
return
new
ObjectResult
(
CommonEnum
.
RecordNotFound
);
}
if
(
string
.
IsNullOrEmpty
(
location
.
sn
))
{
return
new
ObjectResult
(
AccEnum
.
LocationNoSn
);
}
var
levelSection
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
unloading
.
section
);
var
lineMode
=
_automationLine
.
Get
(
f
=>
f
.
section
==
levelSection
.
parentid
);
if
(
lineMode
==
null
)
{
return
new
ObjectResult
(
AccEnum
.
LineModeNotfound
);
}
//TODO
//1. 有检验状态 (立库-》检验工位)
//2. 无检验状态 (立库-》上下料工位)
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
no
=
taskNo
,
action
=
lineMode
.
inspect
==
1
?
Automation
.
TaskAction
.
Step_LK_CJT
:
Automation
.
TaskAction
.
Step_LK_SXLW
,
actiontype
=
Automation
.
ExcueType
.
None
,
triggertime
=
DateTime
.
Now
,
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
MinValue
,
sectionid
=
unloading
.
section
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
productid
=
location
.
productid
,
sn
=
location
.
sn
,
ordercode
=
location
.
ordernumber
,
fixtureguid
=
location
.
fixturetools
,
locationid
=
location
.
locationid
,
productcode
=
location
.
productcode
,
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-准备上料"
,
});
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
unloading
.
section
);
if
(
monitor
==
null
)
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
fixtureguid
=
location
.
fixturetools
,
fixturename
=
location
.
fixturename
,
projectId
=
ProjectId
,
section
=
unloading
.
section
,
sn
=
location
.
sn
,
createtime
=
DateTime
.
Now
,
updatetime
=
DateTime
.
Now
,
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
,
productId
=
location
.
productid
,
productCode
=
location
.
productcode
,
productName
=
location
.
productname
,
ordernumber
=
location
.
ordernumber
,
locationId
=
location
.
locationid
});
}
else
{
monitor
.
sn
=
location
.
sn
;
monitor
.
updatetime
=
DateTime
.
Now
;
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
monitor
.
productId
=
location
.
productid
;
monitor
.
productName
=
location
.
productname
;
monitor
.
productCode
=
location
.
productcode
;
monitor
.
ordernumber
=
location
.
ordernumber
;
monitor
.
locationId
=
location
.
locationid
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
return
new
ObjectResult
(
1
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
}
/// <summary>
/// <summary>
...
@@ -513,7 +615,64 @@ namespace Siger.ApiACC.Controllers
...
@@ -513,7 +615,64 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
Disassemble
([
FromBody
]
Requestdisassemble
disassemble
)
public
IActionResult
Disassemble
([
FromBody
]
Requestdisassemble
disassemble
)
{
{
return
new
ObjectResult
(
1
);
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
disassemble
.
section
);
if
(
machineStatus
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
if
(
machineStatus
.
enable
==
0
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
if
(!
_automationTaskList
.
CanTask
(
ProjectId
,
disassemble
.
section
))
{
throw
new
BadRequestException
(
AccEnum
.
TaskProcessing
);
}
//创建 安装完成动作
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
projectId
==
ProjectId
&&
f
.
section
==
disassemble
.
section
);
if
(
monitor
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
//移出 上料位
monitor
.
section
=
0
;
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
no
=
taskNo
,
action
=
Automation
.
TaskAction
.
Step_SXLW_LK
,
actiontype
=
Automation
.
ExcueType
.
None
,
triggertime
=
DateTime
.
Now
,
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
Now
,
sectionid
=
disassemble
.
section
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
productid
=
monitor
.
productId
,
sn
=
monitor
.
sn
,
ordercode
=
monitor
.
ordernumber
,
fixtureguid
=
monitor
.
fixtureguid
,
locationid
=
monitor
.
locationId
,
productcode
=
monitor
.
productCode
,
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-拆卸完成"
,
});
if
(
_unitOfWork
.
Commit
()
>
0
)
{
Logger
.
WriteLineError
(
$"手动任务-拆卸完成-
{
Siger
.
Middlelayer
.
Common
.
Helpers
.
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
}
}
}
}
}
Server/Common/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
View file @
b2e971e0
...
@@ -43,5 +43,10 @@ namespace Siger.Middlelayer.Share.Constant
...
@@ -43,5 +43,10 @@ namespace Siger.Middlelayer.Share.Constant
/// </summary>
/// </summary>
public
const
string
WarehouseStation
=
"WarehouseStation"
;
public
const
string
WarehouseStation
=
"WarehouseStation"
;
/// <summary>
/// 检验
/// </summary>
public
const
string
InspectStation
=
"InspectStation"
;
}
}
}
}
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
b2e971e0
...
@@ -341,7 +341,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -341,7 +341,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"产线当前为自动模式"
)]
[
Description
(
"产线当前为自动模式"
)]
LineIsAutoMode
,
LineIsAutoMode
,
[
Description
(
"该任务已经下发"
)]
[
Description
(
"该任务已经下发"
)]
TaskIsSend
TaskIsSend
,
[
Description
(
"该储位无工件"
)]
LocationNoSn
,
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
b2e971e0
...
@@ -95,7 +95,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -95,7 +95,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
return
_context
.
siger_wms_storage_location
.
Where
(
q
=>
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
return
_context
.
siger_wms_storage_location
.
Where
(
q
=>
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
}
}
public
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
)
public
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
,
int
hasMaterial
)
{
{
var
query
=
from
q
in
_context
.
siger_automation_location
var
query
=
from
q
in
_context
.
siger_automation_location
join
t
in
_context
.
siger_automation_fixture_tools
on
q
.
fixturetools
equals
t
.
guid
join
t
in
_context
.
siger_automation_fixture_tools
on
q
.
fixturetools
equals
t
.
guid
...
@@ -119,7 +119,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -119,7 +119,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
materialsn
=
q
.
sn
??
""
,
materialsn
=
q
.
sn
??
""
,
categoryid
=
c
==
null
?
0
:
c
.
id
categoryid
=
c
==
null
?
0
:
c
.
id
};
};
var
entities
=
query
.
AsNoTracking
().
ToList
();
Expression
<
Func
<
ResponseAutomationLocationList
,
bool
>>
locationidExpression
=
f
=>
true
;
if
(
hasMaterial
!=
0
)
{
locationidExpression
=
q
=>!
string
.
IsNullOrEmpty
(
q
.
materialsn
);
}
var
entities
=
query
.
Where
(
locationidExpression
).
AsNoTracking
().
ToList
();
return
entities
;
return
entities
;
}
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationLocationRepository.cs
View file @
b2e971e0
...
@@ -14,7 +14,13 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -14,7 +14,13 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
);
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
);
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
);
/// <summary>
/// 获取储位
/// </summary>
/// <param name="projectid">项目ID</param>
/// <param name="hasMaterial">只查有SN</param>
/// <returns></returns>
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
,
int
hasMaterial
);
IEnumerable
<
siger_wms_storage_location
>
GetLocationList
(
int
projectid
);
IEnumerable
<
siger_wms_storage_location
>
GetLocationList
(
int
projectid
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
View file @
b2e971e0
...
@@ -31,6 +31,8 @@ namespace Siger.Middlelayer.AccRepository.Request
...
@@ -31,6 +31,8 @@ namespace Siger.Middlelayer.AccRepository.Request
{
{
public
int
section
{
get
;
set
;
}
public
int
section
{
get
;
set
;
}
public
int
locationid
{
get
;
set
;
}
}
}
/// <summary>
/// <summary>
...
...
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