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
46b709eb
Commit
46b709eb
authored
Jan 25, 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
cd96e080
8a665cad
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
160 additions
and
36 deletions
+160
-36
feedingBlanking.vue
Html/src/view/fml/operation_manage/feedingBlanking.vue
+19
-5
assemblyInfo.vue
Html/src/view/fms/associate/assemblyInfo.vue
+58
-19
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+26
-4
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+48
-2
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+2
-1
AutomationTaskListRepository.cs
...ccRepository/Repositories/AutomationTaskListRepository.cs
+3
-3
IAutomationTaskListRepository.cs
...y/Repositories/Interface/IAutomationTaskListRepository.cs
+1
-1
No files found.
Html/src/view/fml/operation_manage/feedingBlanking.vue
View file @
46b709eb
...
@@ -29,7 +29,15 @@
...
@@ -29,7 +29,15 @@
:class=
"
{ active: b == index }"
:class=
"
{ active: b == index }"
>
>
<p>
{{
item
.
title
}}
</p>
<p>
{{
item
.
title
}}
</p>
<p>
{{
item
.
status
==
1
?
"待上料"
:
"运行中"
}}
</p>
<p>
{{
item
.
status
==
1
?
"待上料"
:
orderDetail
.
status
==
2
?
"运行中"
:
"待下料"
}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -79,7 +87,11 @@
...
@@ -79,7 +87,11 @@
<p
class=
"flex"
>
<p
class=
"flex"
>
<span
class=
"infoLabel"
>
状态:
</span>
<span
class=
"infoLabel"
>
状态:
</span>
<span
class=
"info"
>
{{
<span
class=
"info"
>
{{
orderDetail
.
status
orderDetail
.
status
==
1
?
"待上料"
:
orderDetail
.
status
==
2
?
"运行中"
:
"待下料"
}}
</span>
}}
</span>
</p>
</p>
<p
class=
"flex"
>
<p
class=
"flex"
>
...
@@ -103,7 +115,9 @@
...
@@ -103,7 +115,9 @@
<Button
type=
"primary"
@
click=
"feedReady()"
<Button
type=
"primary"
@
click=
"feedReady()"
>
准备上料
</Button
>
准备上料
</Button
>
>
<Button
type=
"primary"
@
click=
"installOver()"
>
安装完成
</Button>
<Button
type=
"primary"
@
click=
"installOver()"
>
安装完成
</Button
>
</div>
</div>
</TabPane>
</TabPane>
<TabPane
label=
"下料"
:disabled=
"attr2"
name=
"2"
<TabPane
label=
"下料"
:disabled=
"attr2"
name=
"2"
...
@@ -245,7 +259,7 @@ export default {
...
@@ -245,7 +259,7 @@ export default {
a
:
-
1
,
a
:
-
1
,
b
:
-
1
,
b
:
-
1
,
attr1
:
false
,
//上料、下料、上下料
attr1
:
false
,
//上料、下料、上下料
attr2
:
fals
e
,
//上料、下料、上下料
attr2
:
tru
e
,
//上料、下料、上下料
modal
:
false
,
modal
:
false
,
code
:
""
,
//工令单
code
:
""
,
//工令单
columns1
:
[
columns1
:
[
...
@@ -461,7 +475,7 @@ export default {
...
@@ -461,7 +475,7 @@ export default {
"/acc/AutomationOperate/CompalateAssemble"
,
"/acc/AutomationOperate/CompalateAssemble"
,
data
,
data
,
"post"
"post"
).
th
ne
((
res
)
=>
{
).
th
en
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
if
(
res
.
data
.
ret
==
1
)
{
this
.
$Message
.
success
(
this
.
$t
(
res
.
data
.
msg
));
this
.
$Message
.
success
(
this
.
$t
(
res
.
data
.
msg
));
}
else
{
}
else
{
...
...
Html/src/view/fms/associate/assemblyInfo.vue
View file @
46b709eb
...
@@ -106,8 +106,11 @@
...
@@ -106,8 +106,11 @@
class=
"tableClass"
class=
"tableClass"
:columns=
"columns1"
:columns=
"columns1"
:data=
"data1"
:data=
"data1"
highlight-row
@
on-row-click=
"onExpand"
@
on-row-click=
"onExpand"
></Table>
></Table>
<!-- @on-row-click="onExpand" -->
<div
class=
"pageDiv"
>
<div
class=
"pageDiv"
>
<div
class=
"pageDirection"
>
<div
class=
"pageDirection"
>
<Page
<Page
...
@@ -144,6 +147,7 @@
...
@@ -144,6 +147,7 @@
v-model=
"parentType"
v-model=
"parentType"
change-on-select
change-on-select
@
on-change=
"getCategory1"
@
on-change=
"getCategory1"
:disabled=
"disabled"
></Cascader>
></Cascader>
</div>
</div>
<div
class=
"filter"
>
<div
class=
"filter"
>
...
@@ -155,6 +159,7 @@
...
@@ -155,6 +159,7 @@
filterable
filterable
filter-by-label
filter-by-label
class=
"searchSelect"
class=
"searchSelect"
:disabled=
"disabled"
>
>
<Option
<Option
v-for=
"(item, index) in toolingList1"
v-for=
"(item, index) in toolingList1"
...
@@ -256,6 +261,7 @@ export default {
...
@@ -256,6 +261,7 @@ export default {
nonce
:
localStorage
.
getItem
(
"nonce"
),
nonce
:
localStorage
.
getItem
(
"nonce"
),
sign
:
localStorage
.
getItem
(
"sign"
),
sign
:
localStorage
.
getItem
(
"sign"
),
},
},
disabled
:
false
,
columns1
:
[
columns1
:
[
{
{
type
:
"expand"
,
type
:
"expand"
,
...
@@ -278,8 +284,8 @@ export default {
...
@@ -278,8 +284,8 @@ export default {
currentRow
,
currentRow
,
oldCurrentRow
oldCurrentRow
)
=>
{
)
=>
{
this
.
childObj
=
{};
this
.
childObj
=
currentRow
;
this
.
childObj
=
currentRow
;
console
.
log
(
currentRow
);
},
},
},
},
});
});
...
@@ -428,6 +434,7 @@ export default {
...
@@ -428,6 +434,7 @@ export default {
fileurl
:
""
,
fileurl
:
""
,
filename
:
""
,
filename
:
""
,
UploadAction
:
this
.
axios
.
publicPath
+
"config/upload/UploadImage"
,
UploadAction
:
this
.
axios
.
publicPath
+
"config/upload/UploadImage"
,
detailobj
:
{},
childObj
:
{},
childObj
:
{},
};
};
},
},
...
@@ -468,14 +475,25 @@ export default {
...
@@ -468,14 +475,25 @@ export default {
});
});
},
},
add
()
{
add
()
{
this
.
parentType
=
[];
this
.
parentId
=
0
;
this
.
sonType
=
[];
this
.
sonType
=
[];
this
.
sonId
=
0
;
this
.
sonId
=
0
;
this
.
remark
=
""
;
this
.
remark
=
""
;
this
.
fileurl
=
""
;
this
.
fileurl
=
""
;
this
.
filename
=
""
;
this
.
filename
=
""
;
this
.
modal
=
true
;
this
.
modal
=
true
;
this
.
toolingId2
=
0
;
this
.
disabled
=
false
;
if
(
!
this
.
detailobj
.
id
)
{
this
.
parentType
=
[];
this
.
parentId
=
0
;
}
else
{
this
.
parentType
=
this
.
detailobj
.
categoryids
;
this
.
parentId
=
this
.
detailobj
.
categoryid
;
this
.
getToolingList
(
1
);
this
.
$nextTick
(()
=>
{
this
.
toolingId1
=
this
.
detailobj
.
fixturetoolid
;
});
}
this
.
type
=
1
;
this
.
type
=
1
;
},
},
addPost
()
{
addPost
()
{
...
@@ -486,21 +504,26 @@ export default {
...
@@ -486,21 +504,26 @@ export default {
fileurl
:
this
.
fileurl
,
//url
fileurl
:
this
.
fileurl
,
//url
filename
:
this
.
filename
,
//附件名称
filename
:
this
.
filename
,
//附件名称
status
:
1
,
status
:
1
,
remark
:
this
.
remark
,
};
};
if
(
this
.
type
==
1
)
{
if
(
this
.
type
==
1
)
{
url
=
"/acc/FixtureToolsAssembly/Add"
;
url
=
"/acc/FixtureToolsAssembly/Add"
;
}
}
if
(
this
.
type
==
2
)
{
if
(
this
.
type
==
2
)
{
data
.
id
=
this
.
childObj
.
id
;
data
.
id
=
this
.
childObj
.
id
;
url
=
"/acc/FixtureToolsAssembly/Update"
;
}
}
this
.
request
(
"/acc/FixtureToolsAssembly/Add"
,
data
,
"post"
).
then
(
this
.
request
(
url
,
data
,
"post"
).
then
((
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
if
(
res
.
data
.
ret
==
1
)
{
this
.
$Message
.
success
(
this
.
$t
(
res
.
data
.
msg
));
}
else
{
this
.
modal
=
false
;
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
.
msg
));
this
.
detailobj
=
{};
}
this
.
childObj
=
{};
this
.
search
(
this
.
page
,
this
.
pagesize
);
}
else
{
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
.
msg
));
}
}
);
}
);
},
},
edit
()
{
edit
()
{
if
(
!
this
.
childObj
.
id
)
{
if
(
!
this
.
childObj
.
id
)
{
...
@@ -511,25 +534,33 @@ export default {
...
@@ -511,25 +534,33 @@ export default {
this
.
sonType
=
this
.
childObj
.
categoryids
;
this
.
sonType
=
this
.
childObj
.
categoryids
;
this
.
parentId
=
this
.
childObj
.
parentcategoryid
;
this
.
parentId
=
this
.
childObj
.
parentcategoryid
;
this
.
getToolingList
(
1
);
this
.
getToolingList
(
1
);
this
.
$nextTick
(()
=>
{
this
.
toolingId1
=
this
.
childObj
.
parentid
;
});
this
.
sonId
=
this
.
childObj
.
categoryid
;
this
.
sonId
=
this
.
childObj
.
categoryid
;
this
.
getToolingList
(
2
);
this
.
getToolingList
(
2
);
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
toolingId1
=
this
.
childObj
.
parentid
;
this
.
toolingId2
=
this
.
childObj
.
fixturetoolid
;
this
.
toolingId2
=
this
.
childObj
.
fixturetoolid
;
});
});
this
.
filename
=
this
.
childObj
.
filename
;
this
.
filename
=
this
.
childObj
.
filename
;
this
.
fileurl
=
this
.
childObj
.
fileurl
;
this
.
fileurl
=
this
.
childObj
.
fileurl
;
this
.
remark
=
this
.
childObj
.
remark
;
this
.
remark
=
this
.
childObj
.
remark
;
this
.
disabled
=
true
;
this
.
type
=
2
;
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
dele
()
{
dele
()
{
return
;
if
(
this
.
detailobj
.
id
===
undefined
||
this
.
detailobj
.
id
===
null
)
{
if
(
this
.
detailobj
.
id
===
undefined
||
this
.
detailobj
.
id
===
null
)
{
this
.
$Message
.
error
(
this
.
$t
(
"1017"
));
this
.
$Message
.
error
(
this
.
$t
(
"1017"
));
return
false
;
return
false
;
}
else
{
}
else
{
// if (!this.childObj.id) {
// this.$Message.error("请选择子工装信息");
// return false;
// }
var
params
=
{
var
params
=
{
id
:
this
.
detailobj
.
id
,
id
:
this
.
childObj
.
id
?
this
.
childObj
.
id
:
this
.
detailobj
.
id
,
};
};
this
.
$Modal
.
confirm
({
this
.
$Modal
.
confirm
({
title
:
this
.
$t
(
"1018"
),
title
:
this
.
$t
(
"1018"
),
...
@@ -540,7 +571,7 @@ export default {
...
@@ -540,7 +571,7 @@ export default {
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
axios
this
.
axios
.
request
({
.
request
({
url
:
"/acc/FixtureTools
Product
/Delete"
,
url
:
"/acc/FixtureTools
Assembly
/Delete"
,
params
,
params
,
method
:
"get"
,
method
:
"get"
,
})
})
...
@@ -586,9 +617,6 @@ export default {
...
@@ -586,9 +617,6 @@ export default {
this
.
parentType
.
length
>
0
this
.
parentType
.
length
>
0
?
this
.
parentType
[
this
.
parentType
.
length
-
1
]
?
this
.
parentType
[
this
.
parentType
.
length
-
1
]
:
0
;
:
0
;
console
.
log
(
val
);
console
.
log
(
this
.
parentId
);
if
(
this
.
parentId
!=
0
)
{
if
(
this
.
parentId
!=
0
)
{
this
.
getToolingList
(
1
);
this
.
getToolingList
(
1
);
...
@@ -607,7 +635,6 @@ export default {
...
@@ -607,7 +635,6 @@ export default {
getToolingList
(
index
)
{
getToolingList
(
index
)
{
let
id
=
0
;
let
id
=
0
;
id
=
index
==
1
?
this
.
parentId
:
this
.
sonId
;
id
=
index
==
1
?
this
.
parentId
:
this
.
sonId
;
console
.
log
(
index
);
this
.
request
(
this
.
request
(
"/acc/FixtureTools/GetFixtureToolList?categoryid="
+
id
,
"/acc/FixtureTools/GetFixtureToolList?categoryid="
+
id
,
""
,
""
,
...
@@ -643,6 +670,14 @@ export default {
...
@@ -643,6 +670,14 @@ export default {
},
},
handleRowChange
(
currentRow
,
oldCurrentRow
)
{
handleRowChange
(
currentRow
,
oldCurrentRow
)
{
this
.
detailobj
=
currentRow
;
this
.
detailobj
=
currentRow
;
console
.
log
(
currentRow
);
// this.data1.forEach((item, i) => {
// //这个循环是为了每次只能展开一个,其他自动收起,不需要可以去掉
// i !== currentRow.index ? (this.data1[currentRow.index]._expanded = false) : "";
// });
// this.data1[currentRow.index]._expanded = !this.data1[currentRow.index]._expanded;
// this.data1.sort();
// this.childObj = {};
},
},
onExpand
(
row
,
index
)
{
onExpand
(
row
,
index
)
{
this
.
detailobj
=
row
;
this
.
detailobj
=
row
;
...
@@ -652,8 +687,12 @@ export default {
...
@@ -652,8 +687,12 @@ export default {
i
!==
index
?
(
this
.
data1
[
i
].
_expanded
=
false
)
:
""
;
i
!==
index
?
(
this
.
data1
[
i
].
_expanded
=
false
)
:
""
;
});
});
this
.
data1
[
index
].
_expanded
=
!
this
.
data1
[
index
].
_expanded
;
this
.
data1
[
index
].
_expanded
=
!
this
.
data1
[
index
].
_expanded
;
if
(
this
.
data1
[
index
].
_expanded
==
false
)
{
this
.
detailobj
=
{};
this
.
toolingId1
=
0
;
this
.
childObj
=
{};
}
this
.
data1
.
sort
();
this
.
data1
.
sort
();
this
.
childObj
=
{};
},
},
handlePageSize
(
value
)
{
handlePageSize
(
value
)
{
this
.
page
=
1
;
this
.
page
=
1
;
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
46b709eb
...
@@ -197,6 +197,15 @@ namespace Siger.ApiACC.Controllers
...
@@ -197,6 +197,15 @@ namespace Siger.ApiACC.Controllers
taskObj
.
status
=
request
.
status
;
taskObj
.
status
=
request
.
status
;
_automationTaskList
.
Update
(
taskObj
);
_automationTaskList
.
Update
(
taskObj
);
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
machineStatus
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
machineStatus
.
status
=
request
.
status
;
_automationMachineStatus
.
Update
(
machineStatus
);
if
(
_unitOfWork
.
Commit
()
<=
0
)
if
(
_unitOfWork
.
Commit
()
<=
0
)
{
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
...
@@ -266,6 +275,12 @@ namespace Siger.ApiACC.Controllers
...
@@ -266,6 +275,12 @@ namespace Siger.ApiACC.Controllers
return
;
return
;
}
}
var
updownDic
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
uploadStations
=
updownDic
.
Select
(
f
=>
f
.
dval
).
ToList
();
/* 自动任务创建只有CNC 设备;排除上料设备(手动任务) */
var
dictClean
=
stationDicts
.
FirstOrDefault
(
s
=>
s
.
dkey
==
DictKeyValConst
.
CleanStation
);
var
dictClean
=
stationDicts
.
FirstOrDefault
(
s
=>
s
.
dkey
==
DictKeyValConst
.
CleanStation
);
if
(
dictClean
==
null
)
if
(
dictClean
==
null
)
{
{
...
@@ -287,7 +302,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -287,7 +302,7 @@ namespace Siger.ApiACC.Controllers
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗剂Task"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗剂Task"
);
CreateTask
(
cleanMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
);
CreateTask
(
cleanMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
,
uploadStations
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
}
}
...
@@ -298,7 +313,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -298,7 +313,7 @@ namespace Siger.ApiACC.Controllers
if
(
freeMachine
!=
null
)
if
(
freeMachine
!=
null
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备上料Task"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备上料Task"
);
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
);
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
uploadStations
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
//优先级3:其他设备下料 (加工中心 ->立库)
//优先级3:其他设备下料 (加工中心 ->立库)
...
@@ -308,7 +323,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -308,7 +323,7 @@ namespace Siger.ApiACC.Controllers
if
(
fullMachine
!=
null
&&
cleanMachine
.
status
==(
int
)
Automation
.
MachineStatus
.
Waiting
)
if
(
fullMachine
!=
null
&&
cleanMachine
.
status
==(
int
)
Automation
.
MachineStatus
.
Waiting
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备下料Task "
);
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备下料Task "
);
CreateTask
(
fullMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_JGZX_QXJ
);
CreateTask
(
fullMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_JGZX_QXJ
,
uploadStations
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
...
@@ -322,8 +337,15 @@ namespace Siger.ApiACC.Controllers
...
@@ -322,8 +337,15 @@ namespace Siger.ApiACC.Controllers
/// <param name="machineStatus"></param>
/// <param name="machineStatus"></param>
/// <param name="actionType"></param>
/// <param name="actionType"></param>
/// <param name="taskAction"></param>
/// <param name="taskAction"></param>
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
)
/// <param name="uploadStations"></param>
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
,
List
<
string
>
uploadStations
)
{
{
var
uploadPostion
=
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
machineStatus
.
section
.
ToString
()));
if
(
uploadPostion
)
{
Logger
.
WriteLineInfo
(
$"CreateTask 上料料工站 无需自动创建任务 "
);
return
;
}
//j检查工装监控状态
//j检查工装监控状态
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
machineStatus
.
section
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
machineStatus
.
section
);
if
(
monitor
==
null
)
if
(
monitor
==
null
)
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
46b709eb
...
@@ -261,7 +261,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -261,7 +261,7 @@ namespace Siger.ApiACC.Controllers
productcode
=
plan
.
product_code
,
productcode
=
plan
.
product_code
,
processid
=
0
,
processid
=
0
,
programnumber
=
""
,
programnumber
=
""
,
remark
=
"手动任务"
,
remark
=
"手动任务
-准备上料
"
,
});
});
...
@@ -301,9 +301,14 @@ namespace Siger.ApiACC.Controllers
...
@@ -301,9 +301,14 @@ namespace Siger.ApiACC.Controllers
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
Logger
.
WriteLineError
(
$"手动任务创建成功-
{
Siger
.
Middlelayer
.
Common
.
Helpers
.
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_LK_SXLW
)}
"
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
}
/// <summary>
/// <summary>
...
@@ -337,9 +342,50 @@ namespace Siger.ApiACC.Controllers
...
@@ -337,9 +342,50 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
TaskProcessing
);
throw
new
BadRequestException
(
AccEnum
.
TaskProcessing
);
}
}
//创建 安装完成动作
//创建 安装完成动作
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
projectId
==
ProjectId
&&
f
.
section
==
assemble
.
section
);
if
(
monitor
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
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
.
MinValue
,
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
Now
,
sectionid
=
assemble
.
section
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
productid
=
0
,
sn
=
monitor
.
sn
,
ordercode
=
monitor
.
ordernumber
,
fixtureguid
=
monitor
.
fixtureguid
,
locationid
=
monitor
.
locationId
,
productcode
=
monitor
.
productCode
,
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-安装完成"
,
return
new
ObjectResult
(
1
);
});
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
);
}
}
}
/// <summary>
/// <summary>
/// 准备下料
/// 准备下料
...
...
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
46b709eb
...
@@ -332,7 +332,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -332,7 +332,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"设备正在空闲中"
)]
[
Description
(
"设备正在空闲中"
)]
MachineOnFree
,
MachineOnFree
,
[
Description
(
"设备已经生产完成"
)]
[
Description
(
"设备已经生产完成"
)]
MachineProCompalate
MachineProCompalate
,
[
Description
(
"该设备当前无工装状态"
)]
MonitorNotfound
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
46b709eb
...
@@ -105,7 +105,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -105,7 +105,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join
q
in
_context
.
siger_automation_fixture_tools_product
on
p
.
product_code
equals
q
.
productcode
join
q
in
_context
.
siger_automation_fixture_tools_product
on
p
.
product_code
equals
q
.
productcode
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
join
l
in
_context
.
siger_automation_location
on
t
.
guid
equals
l
.
fixturetools
join
l
in
_context
.
siger_automation_location
on
t
.
guid
equals
l
.
fixturetools
where
q
.
projectId
==
projectId
&&
d
.
OrderNumber
==
ordernumber
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
where
q
.
projectId
==
projectId
&&
d
.
OrderNumber
==
ordernumber
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
l
.
status
==(
int
)
RowState
.
Valid
select
new
ResponsePlanlFixtureInfo
select
new
ResponsePlanlFixtureInfo
{
{
OrderNumber
=
ordernumber
,
OrderNumber
=
ordernumber
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationTaskListRepository.cs
View file @
46b709eb
...
@@ -36,14 +36,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -36,14 +36,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
{
var
date
=
DateTime
.
Now
;
var
date
=
DateTime
.
Now
;
var
lable
=
date
.
ToString
(
UnixTimeHelper
.
DateTimeFormatYmd
)+
date
.
Hour
+
date
.
Minute
+
date
.
Second
+
date
.
Millisecond
;
var
lable
=
date
.
ToString
(
UnixTimeHelper
.
DateTimeFormatYmd
)+
date
.
Hour
+
date
.
Minute
+
date
.
Second
+
date
.
Millisecond
;
var
lableUnix
=
UnixTimeHelper
.
GetNow
();
var
radon
=
new
Random
().
Next
(
1000
,
9999
);
var
radon
=
new
Random
().
Next
(
1000
,
9999
);
if
(
trigerType
==
TaskTrigerType
.
Auto
)
if
(
trigerType
==
TaskTrigerType
.
Auto
)
{
{
return
$"A
{
radon
}
T
{
lable
}
"
;
return
$"A
{
lableUnix
}
R
{
radon
}
T
{
lable
}
"
;
}
else
}
else
{
{
return
$"M
{
radon
}
T
{
lable
}
"
;
return
$"M
{
lableUnix
}
R
{
radon
}
T
{
lable
}
"
;
}
}
}
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationTaskListRepository.cs
View file @
46b709eb
...
@@ -10,7 +10,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -10,7 +10,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
/// <summary>
/// <summary>
/// 是否能创建任务
///
上下料时候
是否能创建任务
/// </summary>
/// </summary>
/// <param name="projectId"></param>
/// <param name="projectId"></param>
/// <param name="section"></param>
/// <param name="section"></param>
...
...
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