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
245ebee1
Commit
245ebee1
authored
Mar 15, 2021
by
yiyu.li
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
510acdf2
853b014c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
297 additions
and
64 deletions
+297
-64
en-US.js
Html/src/locale/lang/en-US.js
+2
-0
zh-CN.js
Html/src/locale/lang/zh-CN.js
+4
-0
feedingBlanking.vue
Html/src/view/fml/operation_manage/feedingBlanking.vue
+23
-7
lineMonitor.vue
Html/src/view/fml/statistical_analysis/lineMonitor.vue
+3
-3
taskList.vue
Html/src/view/fml/statistical_analysis/taskList.vue
+60
-13
applicationhost.config
Server/.vs/SigerData/config/applicationhost.config
+6
-6
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+0
-0
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+9
-1
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+0
-0
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+59
-2
QmsCheckController.cs
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
+22
-9
AutoMES.cs
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
+4
-2
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+5
-1
FixtureTools.cs
.../Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
+8
-4
InspectStandardList.cs
...Middlelayer.Utility/ImportEntities/InspectStandardList.cs
+1
-1
siger_automation_machine_property.cs
...cRepository/Entities/siger_automation_machine_property.cs
+2
-2
siger_automation_task_list.cs
...ayer.AccRepository/Entities/siger_automation_task_list.cs
+1
-1
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+1
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+3
-2
AutomationTaskListRepository.cs
...ccRepository/Repositories/AutomationTaskListRepository.cs
+6
-2
ResponseAutomationFixtureDetails.cs
...ccRepository/Response/ResponseAutomationFixtureDetails.cs
+29
-0
ResponseAutomationSnhistory.cs
...yer.AccRepository/Response/ResponseAutomationSnhistory.cs
+19
-0
ResponseAutomationTasklist.cs
...ayer.AccRepository/Response/ResponseAutomationTasklist.cs
+6
-0
InspectStandardRepository.cs
...r.QmsRepository/Repositories/InspectStandardRepository.cs
+18
-7
ResponseLoadStation.cs
...er.Middlelayer.Repository/Response/ResponseLoadStation.cs
+6
-1
No files found.
Html/src/locale/lang/en-US.js
View file @
245ebee1
...
@@ -6661,6 +6661,8 @@ export default {
...
@@ -6661,6 +6661,8 @@ export default {
'8220'
:
'未备模'
,
'8220'
:
'未备模'
,
'8221'
:
'备模中'
,
'8221'
:
'备模中'
,
'8222'
:
'备模完成'
,
'8222'
:
'备模完成'
,
'8223'
:
'请填写项次'
,
'8224'
:
'项次必须是正整数'
,
'120001'
:
'模具未找到'
,
'120001'
:
'模具未找到'
,
'120002'
:
'模具类型不能为空'
,
'120002'
:
'模具类型不能为空'
,
...
...
Html/src/locale/lang/zh-CN.js
View file @
245ebee1
...
@@ -2109,6 +2109,8 @@ export default {
...
@@ -2109,6 +2109,8 @@ export default {
'3000174'
:
'储位不存在'
,
'3000174'
:
'储位不存在'
,
'3000175'
:
'工序加工未完成'
,
'3000175'
:
'工序加工未完成'
,
'3000176'
:
'工序未开始加工'
,
'3000176'
:
'工序未开始加工'
,
'3000177'
:
'同步报表记录失败'
,
'3000178'
:
'请勿重复提交任务'
,
'400000'
:
'设备状态'
,
'400000'
:
'设备状态'
,
'400002'
:
'更改状态'
,
'400002'
:
'更改状态'
,
...
@@ -6952,6 +6954,8 @@ export default {
...
@@ -6952,6 +6954,8 @@ export default {
'8220'
:
'未备模'
,
'8220'
:
'未备模'
,
'8221'
:
'备模中'
,
'8221'
:
'备模中'
,
'8222'
:
'备模完成'
,
'8222'
:
'备模完成'
,
'8223'
:
'请填写项次'
,
'8224'
:
'项次必须是正整数'
,
// ims专用,不要接着写
// ims专用,不要接着写
'120001'
:
'模具未找到'
,
'120001'
:
'模具未找到'
,
...
...
Html/src/view/fml/operation_manage/feedingBlanking.vue
View file @
245ebee1
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
{{
{{
item
.
status
==
1
item
.
status
==
1
?
"待上料"
?
"待上料"
:
orderDetail
.
status
==
2
:
item
.
status
==
2
?
"运行中"
?
"运行中"
:
"待下料"
:
"待下料"
}}
}}
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
?
"执行中"
?
"执行中"
:
orderDetail
.
status
==
3
:
orderDetail
.
status
==
3
?
"执行完毕"
?
"执行完毕"
:
"
未下发
"
:
""
}}
</span>
}}
</span>
</p>
</p>
<p
class=
"flex"
>
<p
class=
"flex"
>
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
:data=
"data2"
:data=
"data2"
:columns=
"columns2"
:columns=
"columns2"
:max-height=
"200"
:max-height=
"200"
style=
"width:
50
0px"
style=
"width:
68
0px"
highlight-row
highlight-row
@
on-current-change=
"handleRowChange1"
@
on-current-change=
"handleRowChange1"
></Table>
></Table>
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
?
"执行中"
?
"执行中"
:
orderDetail2
.
status
==
3
:
orderDetail2
.
status
==
3
?
"执行完毕"
?
"执行完毕"
:
"
未下发
"
:
""
}}
</span>
}}
</span>
</p>
</p>
<p
class=
"flex"
>
<p
class=
"flex"
>
...
@@ -325,17 +325,29 @@ export default {
...
@@ -325,17 +325,29 @@ export default {
width
:
70
,
width
:
70
,
},
},
{
{
title
:
"储位编号"
,
title
:
"仓库"
,
key
:
"wavehouse"
,
width
:
70
,
},
{
title
:
"储位"
,
key
:
"locationid"
,
key
:
"locationid"
,
width
:
70
,
},
},
{
{
title
:
"工装编号"
,
title
:
"工装编号"
,
key
:
"code"
,
key
:
"code"
,
width
:
160
,
},
},
{
{
title
:
"工件编号"
,
title
:
"工件编号"
,
key
:
"materialsn"
,
key
:
"materialsn"
,
},
},
{
title
:
"下一工序"
,
key
:
"route"
,
width
:
100
,
},
],
],
data2
:
[],
data2
:
[],
orderDetail
:
{},
orderDetail
:
{},
...
@@ -403,6 +415,7 @@ export default {
...
@@ -403,6 +415,7 @@ export default {
this
.
sectionid
=
this
.
stationList
[
index
].
section
;
this
.
sectionid
=
this
.
stationList
[
index
].
section
;
this
.
orderDetail
=
{};
this
.
orderDetail
=
{};
this
.
code
=
""
;
// status = 2;
// status = 2;
// if (status == 3) {
// if (status == 3) {
// this.attr1 = true;
// this.attr1 = true;
...
@@ -421,6 +434,7 @@ export default {
...
@@ -421,6 +434,7 @@ export default {
this
.
tabindex
=
name
;
this
.
tabindex
=
name
;
if
(
this
.
tabindex
==
"2"
)
{
if
(
this
.
tabindex
==
"2"
)
{
this
.
orderDetail2
=
{};
this
.
orderDetail2
=
{};
}
}
this
.
getStorages
();
this
.
getStorages
();
},
},
...
@@ -432,7 +446,8 @@ export default {
...
@@ -432,7 +446,8 @@ export default {
:
""
;
:
""
;
let
data
=
{
let
data
=
{
fillsn
:
this
.
tabindex
==
"1"
?
0
:
1
,
fillsn
:
this
.
tabindex
==
"1"
?
0
:
1
,
productcode
:
code
,
// productcode: code,
productcode
:
this
.
tabindex
==
"1"
?
code
:
""
,
};
};
this
.
request
(
"/acc/AutomationLocation/GetLocationList"
,
data
,
"get"
)
this
.
request
(
"/acc/AutomationLocation/GetLocationList"
,
data
,
"get"
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -449,6 +464,7 @@ export default {
...
@@ -449,6 +464,7 @@ export default {
getWorkOrderInfo
()
{
getWorkOrderInfo
()
{
let
data
=
{
let
data
=
{
code
:
this
.
code
,
code
:
this
.
code
,
section
:
this
.
sectionid
};
};
this
.
request
(
"/acc/AutomationOperate/ScanCode"
,
data
,
"get"
)
this
.
request
(
"/acc/AutomationOperate/ScanCode"
,
data
,
"get"
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -640,7 +656,7 @@ export default {
...
@@ -640,7 +656,7 @@ export default {
if
(
this
.
locationobj
.
id
)
{
if
(
this
.
locationobj
.
id
)
{
// this.getRunningDetail();
// this.getRunningDetail();
this
.
request
(
this
.
request
(
"/acc/AutomationOperate/ScanCode?id="
+
this
.
locationobj
.
id
,
"/acc/AutomationOperate/ScanCode?id="
+
this
.
locationobj
.
id
+
"§ion="
+
this
.
sectionids
,
""
,
""
,
"get"
"get"
)
)
...
...
Html/src/view/fml/statistical_analysis/lineMonitor.vue
View file @
245ebee1
...
@@ -22,13 +22,13 @@
...
@@ -22,13 +22,13 @@
@
click=
"search()"
@
click=
"search()"
>
{{
$t
(
"1001"
)
}}
</Button
>
{{
$t
(
"1001"
)
}}
</Button
>
>
<Button
<
!--
<
Button
type=
"primary"
type=
"primary"
class=
"twoWord"
class=
"twoWord"
icon=
"ios-search"
icon=
"ios-search"
@
click=
"exportExcel()"
@
click=
"exportExcel()"
>
导出
</Button
>
导出
</Button
>
>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -187,7 +187,7 @@ export default {
...
@@ -187,7 +187,7 @@ export default {
},
},
{
{
title
:
"最后更新时间"
,
title
:
"最后更新时间"
,
key
:
"
workpiece_sn
"
,
key
:
"
lastupdate
"
,
},
},
],
],
data1
:
[],
data1
:
[],
...
...
Html/src/view/fml/statistical_analysis/taskList.vue
View file @
245ebee1
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<Option
:value=
"1"
>
待执行
</Option>
<Option
:value=
"1"
>
待执行
</Option>
<Option
:value=
"2"
>
执行中
</Option>
<Option
:value=
"2"
>
执行中
</Option>
<Option
:value=
"3"
>
执行完成
</Option>
<Option
:value=
"3"
>
执行完成
</Option>
<Option
:value=
"4"
>
取消
</Option>
</Select>
</Select>
</div>
</div>
<div
class=
"filter"
>
<div
class=
"filter"
>
...
@@ -193,7 +193,7 @@ export default {
...
@@ -193,7 +193,7 @@ export default {
params
.
index
+
(
this
.
page
-
1
)
*
this
.
pagesize
+
1
params
.
index
+
(
this
.
page
-
1
)
*
this
.
pagesize
+
1
);
);
},
},
width
:
7
0
,
width
:
5
0
,
},
},
{
{
title
:
"任务编号"
,
title
:
"任务编号"
,
...
@@ -201,50 +201,62 @@ export default {
...
@@ -201,50 +201,62 @@ export default {
width
:
150
,
width
:
150
,
},
},
{
{
title
:
"产线层级"
,
title
:
"发起工站"
,
key
:
"fromsection"
,
width
:
100
,
},
{
title
:
"目标工站"
,
key
:
"section"
,
key
:
"section"
,
width
:
1
5
0
,
width
:
1
7
0
,
},
},
{
{
title
:
"触发方"
,
title
:
"触发方
式
"
,
key
:
"trigger"
,
key
:
"trigger"
,
width
:
100
,
},
},
{
{
title
:
"任务类型"
,
title
:
"任务类型"
,
key
:
"tasktype"
,
key
:
"tasktype"
,
width
:
100
,
},
},
{
{
title
:
"工件编号"
,
title
:
"工件编号"
,
key
:
"sn"
,
key
:
"sn"
,
width
:
15
0
,
width
:
23
0
,
},
},
{
{
title
:
"工单编号"
,
title
:
"工单编号"
,
key
:
"ordernumber"
,
key
:
"ordernumber"
,
width
:
100
,
},
},
{
{
title
:
"产品编号"
,
title
:
"产品编号"
,
key
:
"productCode"
,
key
:
"productCode"
,
width
:
130
,
},
},
{
//
{
title
:
"工序编号"
,
//
title: "工序编号",
key
:
"routeNo"
,
//
key: "routeNo",
},
//
},
{
{
title
:
"工序名称"
,
title
:
"工序名称"
,
key
:
"route"
,
key
:
"route"
,
width
:
90
,
},
},
{
{
title
:
"程序号"
,
title
:
"程序号"
,
key
:
"program"
,
key
:
"program"
,
},
},
{
{
title
:
"储位
位置
"
,
title
:
"储位"
,
key
:
"location"
,
key
:
"location"
,
width
:
70
,
},
},
{
{
title
:
"工装编号"
,
title
:
"工装编号"
,
key
:
"fixtureCode"
,
key
:
"fixtureCode"
,
width
:
160
,
},
},
{
{
title
:
"动作"
,
title
:
"动作"
,
...
@@ -256,34 +268,69 @@ export default {
...
@@ -256,34 +268,69 @@ export default {
key
:
"actionType"
,
key
:
"actionType"
,
},
},
{
{
title
:
"下发状态"
,
key
:
"send"
,
width
:
100
,
render
:
(
h
,
params
)
=>
{
let
str
=
""
,
bgc
=
""
;
switch
(
params
.
row
.
send
)
{
case
0
:
str
=
"未下发"
;
bgc
=
'Olive'
break
;
case
1
:
str
=
"已下发"
;
bgc
=
'Green'
break
;
}
return
h
(
"div"
,{
style
:{
'background'
:
bgc
,
'color'
:
'#fff'
}
}
,
str
);
},
},
{
title
:
"状态"
,
title
:
"状态"
,
key
:
"status"
,
key
:
"status"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
let
str
=
""
;
let
str
=
""
,
bgc
=
""
;
switch
(
params
.
row
.
status
)
{
switch
(
params
.
row
.
status
)
{
case
1
:
case
1
:
str
=
"待执行"
;
str
=
"待执行"
;
bgc
=
'Olive'
break
;
break
;
case
2
:
case
2
:
str
=
"执行中"
;
str
=
"执行中"
;
bgc
=
'Orange'
break
;
break
;
case
3
:
case
3
:
str
=
"执行完成"
;
str
=
"执行完成"
;
bgc
=
'Green'
break
;
break
;
case
4
:
case
4
:
str
=
"取消"
;
str
=
"取消"
;
bgc
=
'Silver'
break
;
break
;
}
}
return
h
(
"div"
,
str
);
return
h
(
"div"
,{
style
:{
'background'
:
bgc
,
'color'
:
'#fff'
}
}
,
str
);
},
},
},
},
{
{
title
:
"触发时间"
,
title
:
"触发时间"
,
key
:
"triggerTime"
,
key
:
"triggerTime"
,
width
:
160
,
},
},
{
{
title
:
"完成时间"
,
title
:
"完成时间"
,
key
:
"complatetime"
,
key
:
"complatetime"
,
width
:
160
,
},
},
],
],
data1
:
[],
data1
:
[],
...
...
Server/.vs/SigerData/config/applicationhost.config
View file @
245ebee1
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!--
<!--
IIS
configuration
sections
.
IIS
configuration
sections
.
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
</
site
>
</
site
>
<
site
name
=
"Siger.ApiConfig"
id
=
"2"
>
<
site
name
=
"Siger.ApiConfig"
id
=
"2"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiConfig AppPool"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiConfig AppPool"
>
<
virtualDirectory
path
=
"/"
physicalPath
=
"
E:\gitlabcode
\Laisi_AutoMES2\Server\Apis\Siger.ApiConfig"
/>
<
virtualDirectory
path
=
"/"
physicalPath
=
"
D:\Code\20210208
\Laisi_AutoMES2\Server\Apis\Siger.ApiConfig"
/>
</
application
>
</
application
>
<
bindings
>
<
bindings
>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9002:localhost"
/>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9002:localhost"
/>
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
</
site
>
</
site
>
<
site
name
=
"Siger.ApiQMS"
id
=
"3"
>
<
site
name
=
"Siger.ApiQMS"
id
=
"3"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiQMS AppPool"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiQMS AppPool"
>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
01209\siger-main
\Server\Apis\Siger.ApiQMS"
/>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
10208\Laisi_AutoMES2
\Server\Apis\Siger.ApiQMS"
/>
</
application
>
</
application
>
<
bindings
>
<
bindings
>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9013:localhost"
/>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9013:localhost"
/>
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
</
site
>
</
site
>
<
site
name
=
"Siger.ApiACC"
id
=
"4"
>
<
site
name
=
"Siger.ApiACC"
id
=
"4"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiACC AppPool"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiACC AppPool"
>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
01209\siger-main
\Server\Apis\Siger.ApiACC"
/>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
10208\Laisi_AutoMES2
\Server\Apis\Siger.ApiACC"
/>
</
application
>
</
application
>
<
bindings
>
<
bindings
>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9003:localhost"
/>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9003:localhost"
/>
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
</
site
>
</
site
>
<
site
name
=
"Siger.ApiCNC"
id
=
"5"
>
<
site
name
=
"Siger.ApiCNC"
id
=
"5"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiCNC AppPool"
>
<
application
path
=
"/"
applicationPool
=
"Siger.ApiCNC AppPool"
>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
01209\siger-main
\Server\Apis\Siger.ApiCNC"
/>
<
virtualDirectory
path
=
"/"
physicalPath
=
"D:\Code\202
10208\Laisi_AutoMES2
\Server\Apis\Siger.ApiCNC"
/>
</
application
>
</
application
>
<
bindings
>
<
bindings
>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9008:localhost"
/>
<
binding
protocol
=
"http"
bindingInformation
=
"*:9008:localhost"
/>
...
@@ -1030,7 +1030,7 @@
...
@@ -1030,7 +1030,7 @@
<
handlers
>
<
handlers
>
<
add
name
=
"aspNetCore"
path
=
"*"
verb
=
"*"
modules
=
"AspNetCoreModuleV2"
resourceType
=
"Unspecified"
/>
<
add
name
=
"aspNetCore"
path
=
"*"
verb
=
"*"
modules
=
"AspNetCoreModuleV2"
resourceType
=
"Unspecified"
/>
</
handlers
>
</
handlers
>
<
aspNetCore
processPath
=
"%LAUNCHER_PATH%"
stdoutLogEnabled
=
"false"
hostingModel
=
"InProcess"
startupTimeLimit
=
"3600"
requestTimeout
=
"23:00:00"
/>
<
aspNetCore
processPath
=
"%LAUNCHER_PATH%"
stdoutLogEnabled
=
"false"
hostingModel
=
"InProcess"
startupTimeLimit
=
"3600"
requestTimeout
=
"23:00:00"
arguments
=
"%LAUNCHER_ARGS%"
/>
<
httpCompression
>
<
httpCompression
>
<
dynamicTypes
>
<
dynamicTypes
>
<
add
mimeType
=
"text/event-stream"
enabled
=
"false"
/>
<
add
mimeType
=
"text/event-stream"
enabled
=
"false"
/>
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
245ebee1
This diff is collapsed.
Click to expand it.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
245ebee1
...
@@ -19,6 +19,7 @@ using Siger.Middlelayer.Utility.ImportEntities;
...
@@ -19,6 +19,7 @@ using Siger.Middlelayer.Utility.ImportEntities;
using
Siger.Middlelayer.Utility.Helpers
;
using
Siger.Middlelayer.Utility.Helpers
;
using
System.IO
;
using
System.IO
;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Common.ModuleEnum
;
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
{
{
...
@@ -267,6 +268,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -267,6 +268,10 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
if
(!
string
.
IsNullOrEmpty
(
entity
.
sn
))
{
throw
new
BadRequestException
(
AccEnum
.
LocationSnExits
);
}
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
);
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
);
if
(
fixturetool
==
null
)
if
(
fixturetool
==
null
)
{
{
...
@@ -315,7 +320,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -315,7 +320,10 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
if
(!
string
.
IsNullOrEmpty
(
entity
.
sn
))
{
throw
new
BadRequestException
(
AccEnum
.
LocationSnExits
);
}
entity
.
status
=
(
int
)
RowState
.
Invalid
;
entity
.
status
=
(
int
)
RowState
.
Invalid
;
_autoLocationRepository
.
Update
(
entity
);
_autoLocationRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
245ebee1
This diff is collapsed.
Click to expand it.
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
245ebee1
...
@@ -17,6 +17,8 @@ using Siger.Middlelayer.Common.Helpers;
...
@@ -17,6 +17,8 @@ using Siger.Middlelayer.Common.Helpers;
using
Siger.Middlelayer.Utility.Helpers
;
using
Siger.Middlelayer.Utility.Helpers
;
using
Siger.Middlelayer.Utility.ImportEntities
;
using
Siger.Middlelayer.Utility.ImportEntities
;
using
System.IO
;
using
System.IO
;
using
Siger.Middlelayer.Common.ModuleEnum
;
using
Microsoft.AspNetCore.Mvc.ModelBinding.Validation
;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
...
@@ -28,14 +30,19 @@ namespace Siger.ApiACC.Controllers
...
@@ -28,14 +30,19 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationMachineStatus
_automationMachineStatus
;
private
readonly
IAutomationMachineStatus
_automationMachineStatus
;
private
readonly
IAutomationTaskListRepository
_automationTaskList
;
private
readonly
IAutomationTaskListRepository
_automationTaskList
;
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationLineMode
_automationLineMode
;
private
readonly
IAutomationSectionPropertyRepository
_automationSectionProperty
;
public
AutomationStateController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationMachineStatus
automationMachineStatus
,
IAutomationTaskListRepository
automationTaskList
,
IAutomationFixtureMonitor
automationFixtureMonitor
)
public
AutomationStateController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationMachineStatus
automationMachineStatus
,
IAutomationTaskListRepository
automationTaskList
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationLineMode
automationLineMode
,
IAutomationSectionPropertyRepository
automationSectionProperty
)
{
{
_unitOfWork
=
unitOfWork
;
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
_automationMachineStatus
=
automationMachineStatus
;
_automationMachineStatus
=
automationMachineStatus
;
_automationTaskList
=
automationTaskList
;
_automationTaskList
=
automationTaskList
;
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationLineMode
=
automationLineMode
;
_automationSectionProperty
=
automationSectionProperty
;
}
}
/// <summary>
/// <summary>
...
@@ -82,6 +89,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -82,6 +89,7 @@ namespace Siger.ApiACC.Controllers
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
machineStatus
=
d
.
status
;
item
.
machineStatus
=
d
.
status
;
item
.
status
=
fixture
.
status
;
item
.
status
=
fixture
.
status
;
item
.
lastupdate
=
fixture
.
createtime
.
ToString
();
}
}
result
.
Add
(
item
);
result
.
Add
(
item
);
...
@@ -100,6 +108,17 @@ namespace Siger.ApiACC.Controllers
...
@@ -100,6 +108,17 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
output
);
return
new
ObjectResult
(
output
);
}
}
[
HttpGet
]
[
HttpGet
]
public
IActionResult
GetSnDts
(
string
sn
)
{
return
new
ObjectResult
(
1
);
}
[
HttpGet
]
public
IActionResult
GetFixtureDts
(
string
fixture
)
{
return
new
ObjectResult
(
1
);
}
[
HttpGet
]
public
IActionResult
GetTasklist
(
int
section
,
int
tasktype
,
string
productCode
,
string
taskno
,
string
sn
,
int
status
,
int
actionType
,
string
triggerbegin
,
string
triggerend
,
string
complatebegin
,
string
complatend
,
int
page
,
int
pageSize
,
string
toexcel
)
public
IActionResult
GetTasklist
(
int
section
,
int
tasktype
,
string
productCode
,
string
taskno
,
string
sn
,
int
status
,
int
actionType
,
string
triggerbegin
,
string
triggerend
,
string
complatebegin
,
string
complatend
,
int
page
,
int
pageSize
,
string
toexcel
)
{
{
var
ids
=
new
List
<
int
>();
var
ids
=
new
List
<
int
>();
...
@@ -148,7 +167,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -148,7 +167,7 @@ namespace Siger.ApiACC.Controllers
model
.
status_value
=
""
;
model
.
status_value
=
""
;
break
;
break
;
}
}
model
.
send
=
item
.
send
==
0
?
"未下发"
:
"已下发"
;
dataList
.
Add
(
model
);
dataList
.
Add
(
model
);
}
}
if
(
dataList
.
Any
())
if
(
dataList
.
Any
())
...
@@ -182,6 +201,44 @@ namespace Siger.ApiACC.Controllers
...
@@ -182,6 +201,44 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
if
(
record
.
send
!=
0
)
{
throw
new
BadRequestException
(
AccEnum
.
TaskIsSend
);
}
var
_property
=
_automationSectionProperty
.
GetList
(
f
=>
f
.
propertytype
==
1
&&
(
f
.
upload
>
0
||
f
.
down
>
0
));
if
(
_property
.
Any
())
{
foreach
(
var
perperty
in
_property
)
{
if
(
perperty
.
upload
>
0
)
{
//重置上料位状态
if
(
record
.
sectionid
==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_LK_SXLW
)
{
perperty
.
upload
=
0
;
_automationSectionProperty
.
Update
(
perperty
);
}
}
if
(
perperty
.
down
>
0
)
{
//重置下料位置
//去抽检台
if
(
record
.
extend1
.
ToInt
()==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_LK_CJT
)
{
perperty
.
upload
=
0
;
_automationSectionProperty
.
Update
(
perperty
);
}
//去下料位
if
(
record
.
extend1
.
ToInt
()==
perperty
.
sectionid
&&
record
.
action
==
Automation
.
TaskAction
.
Step_LK_SXLW
)
{
perperty
.
upload
=
0
;
_automationSectionProperty
.
Update
(
perperty
);
}
}
}
}
_automationTaskList
.
Delete
(
record
);
_automationTaskList
.
Delete
(
record
);
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
...
...
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
View file @
245ebee1
...
@@ -21,6 +21,7 @@ using System.IO;
...
@@ -21,6 +21,7 @@ using System.IO;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Common.ModuleEnum
;
using
Siger.Middlelayer.Common.ModuleEnum
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
{
{
...
@@ -267,11 +268,27 @@ namespace Siger.ApiACC.Controllers
...
@@ -267,11 +268,27 @@ namespace Siger.ApiACC.Controllers
try
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
&&
f
.
action
==
TaskAction
.
Step_CJT_SXLW
,
"id"
,
true
).
FirstOrDefault
();
if
(
lastTask
!=
null
)
{
{
if
(
lastTask
.
status
!=
(
int
)
TaskResultStatus
.
Complated
)
{
Logger
.
WriteLineError
(
$"重复检验提交数据,无需创建Task任务"
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
}
CreateTaskList
(
req
.
sectionid
,
req
.
productid
,
product
.
code
,
req
.
sn
,
req
.
routeid
.
ToInt
());
}
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
sectionid
==
req
.
sectionid
&&
f
.
action
==
Automation
.
TaskAction
.
Step_LK_CJT
).
LastOrDefault
();
if
(
tasklist
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
inspection
.
workorder
=
tasklist
.
ordercode
;
CreateTaskList
(
tasklist
,
req
.
sectionid
,
req
.
productid
,
product
.
code
,
req
.
sn
,
req
.
routeid
.
ToInt
());
AddSnList
(
req
.
materialid
.
ToInt
(),
inspection
,
product
.
code
,
section
.
parentid
);
//把二维码插入到 sn_list表
AddSnList
(
req
.
materialid
.
ToInt
(),
inspection
,
product
.
code
,
section
.
parentid
);
//把二维码插入到 sn_list表
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -327,13 +344,9 @@ namespace Siger.ApiACC.Controllers
...
@@ -327,13 +344,9 @@ namespace Siger.ApiACC.Controllers
}
}
}
}
private
void
CreateTaskList
(
int
section
,
int
productid
,
string
productcode
,
string
sn
,
int
routeid
)
private
void
CreateTaskList
(
siger_automation_task_list
tasklist
,
int
section
,
int
productid
,
string
productcode
,
string
sn
,
int
routeid
)
{
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
sectionid
==
section
&&
f
.
action
==
Automation
.
TaskAction
.
Step_LK_CJT
).
LastOrDefault
();
if
(
tasklist
==
null
)
{
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
//找到上下料位
//找到上下料位
...
@@ -344,7 +357,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -344,7 +357,7 @@ namespace Siger.ApiACC.Controllers
action
=
Automation
.
TaskAction
.
Step_CJT_SXLW
,
action
=
Automation
.
TaskAction
.
Step_CJT_SXLW
,
actiontype
=
Automation
.
ExcueType
.
None
,
actiontype
=
Automation
.
ExcueType
.
None
,
triggertime
=
DateTime
.
Now
,
triggertime
=
DateTime
.
Now
,
tasktype
=
Automation
.
TaskActionType
.
Unload
,
tasktype
=
TaskActionType
.
Unload
,
operater
=
UserId
,
operater
=
UserId
,
operatetime
=
DateTime
.
Now
,
operatetime
=
DateTime
.
Now
,
sectionid
=
tasklist
.
extend1
.
ToInt
(),
sectionid
=
tasklist
.
extend1
.
ToInt
(),
...
...
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
View file @
245ebee1
...
@@ -11,6 +11,7 @@ using System;
...
@@ -11,6 +11,7 @@ using System;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
namespace
Siger.ApiACC.Tasks
namespace
Siger.ApiACC.Tasks
{
{
...
@@ -48,7 +49,7 @@ namespace Siger.ApiACC.Tasks
...
@@ -48,7 +49,7 @@ namespace Siger.ApiACC.Tasks
var
section
=
task
.
extend1
.
ToInt
();
var
section
=
task
.
extend1
.
ToInt
();
//抽检台-》上料位特殊逻辑
//抽检台-》上料位特殊逻辑
if
(
task
.
action
==
Automation
.
TaskAction
.
Step_LK_CJT
||
task
.
action
==
Automation
.
TaskAction
.
Step_CJT_SXLW
)
if
(
task
.
action
==
Automation
.
TaskAction
.
Step_LK_CJT
||
task
.
action
==
Automation
.
TaskAction
.
Step_CJT_SXLW
||
task
.
action
==
TaskAction
.
Step_LK_JGZX
||
task
.
action
==
TaskAction
.
Step_LK_SXLW
)
{
{
section
=
task
.
sectionid
;
section
=
task
.
sectionid
;
}
}
...
@@ -58,7 +59,7 @@ namespace Siger.ApiACC.Tasks
...
@@ -58,7 +59,7 @@ namespace Siger.ApiACC.Tasks
var
attr
=
dbhelper
.
GetAttribution
(
section
);
var
attr
=
dbhelper
.
GetAttribution
(
section
);
if
(
attr
==
null
)
if
(
attr
==
null
)
return
;
return
;
Logger
.
WriteLineInfo
(
$"自动下发->PLC :
{
EnumHelper
.
GetEnumDesc
(
task
.
action
)}
Section:
{
section
}
machine:
{
attr
.
machine
}
"
);
var
fixtrue
=
dbhelper
.
GetFixture
(
task
.
fixtureguid
);
var
fixtrue
=
dbhelper
.
GetFixture
(
task
.
fixtureguid
);
if
(
fixtrue
==
null
)
if
(
fixtrue
==
null
)
{
{
...
@@ -87,6 +88,7 @@ namespace Siger.ApiACC.Tasks
...
@@ -87,6 +88,7 @@ namespace Siger.ApiACC.Tasks
return
;
return
;
}
}
task
.
send
=
1
;
task
.
send
=
1
;
task
.
actiontype
=
ExcueType
.
Auto
;
if
(!
dbhelper
.
UpdateTask
(
task
))
if
(!
dbhelper
.
UpdateTask
(
task
))
{
{
Logger
.
WriteLineError
(
$"更新TASK 下发状态失败"
);
Logger
.
WriteLineError
(
$"更新TASK 下发状态失败"
);
...
...
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
245ebee1
...
@@ -357,7 +357,11 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -357,7 +357,11 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"工序加工未完成"
)]
[
Description
(
"工序加工未完成"
)]
RouteProcessing
,
RouteProcessing
,
[
Description
(
"工序未开始加工"
)]
[
Description
(
"工序未开始加工"
)]
RouteNotStart
RouteNotStart
,
[
Description
(
"同步报工记录失败"
)]
SyncSnReportErro
,
[
Description
(
"请勿重复提交任务"
)]
TaskCreateDone
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
View file @
245ebee1
...
@@ -257,9 +257,11 @@ namespace Siger.Middlelayer.Utility.ImportEntities
...
@@ -257,9 +257,11 @@ namespace Siger.Middlelayer.Utility.ImportEntities
{
{
[
ExcelColumn
(
"任务编号"
)]
[
ExcelColumn
(
"任务编号"
)]
public
string
taskno
{
get
;
set
;
}
public
string
taskno
{
get
;
set
;
}
[
ExcelColumn
(
"产线层级"
)]
[
ExcelColumn
(
"发起工站"
)]
public
string
fromsection
{
get
;
set
;
}
[
ExcelColumn
(
"目标工站"
)]
public
string
section
{
get
;
set
;
}
public
string
section
{
get
;
set
;
}
[
ExcelColumn
(
"触发方"
)]
[
ExcelColumn
(
"触发方
式
"
)]
public
string
trigger
{
get
;
set
;
}
public
string
trigger
{
get
;
set
;
}
[
ExcelColumn
(
"任务类型"
)]
[
ExcelColumn
(
"任务类型"
)]
public
string
tasktype
{
get
;
set
;
}
public
string
tasktype
{
get
;
set
;
}
...
@@ -269,8 +271,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
...
@@ -269,8 +271,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public
string
ordernumber
{
get
;
set
;
}
public
string
ordernumber
{
get
;
set
;
}
[
ExcelColumn
(
"产品编号"
)]
[
ExcelColumn
(
"产品编号"
)]
public
string
productCode
{
get
;
set
;
}
public
string
productCode
{
get
;
set
;
}
[
ExcelColumn
(
"工序编号"
)]
//
[ExcelColumn("工序编号")]
public
string
routeNo
{
get
;
set
;
}
//
public string routeNo { get; set; }
[
ExcelColumn
(
"工序名称"
)]
[
ExcelColumn
(
"工序名称"
)]
public
string
route
{
get
;
set
;
}
public
string
route
{
get
;
set
;
}
[
ExcelColumn
(
"程序号"
)]
[
ExcelColumn
(
"程序号"
)]
...
@@ -281,6 +283,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
...
@@ -281,6 +283,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public
string
fixtureCode
{
get
;
set
;
}
public
string
fixtureCode
{
get
;
set
;
}
[
ExcelColumn
(
"动作"
)]
[
ExcelColumn
(
"动作"
)]
public
string
action
{
get
;
set
;
}
public
string
action
{
get
;
set
;
}
[
ExcelColumn
(
"下发状态"
)]
public
string
send
{
get
;
set
;
}
[
ExcelColumn
(
"执行类型"
)]
[
ExcelColumn
(
"执行类型"
)]
public
string
actionType
{
get
;
set
;
}
public
string
actionType
{
get
;
set
;
}
[
ExcelColumn
(
"状态"
)]
[
ExcelColumn
(
"状态"
)]
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/InspectStandardList.cs
View file @
245ebee1
...
@@ -221,7 +221,7 @@ namespace Siger.Middlelayer.Utility.ImportEntities
...
@@ -221,7 +221,7 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public
string
unhealthy_code
{
get
;
set
;
}
public
string
unhealthy_code
{
get
;
set
;
}
[
ExcelColumn
(
"项次*"
)]
[
ExcelColumn
(
"项次*"
)]
public
int
seq
{
get
;
set
;
}
public
string
seq
{
get
;
set
;
}
[
ExcelColumn
(
"是否送检*(1=>人工检验2=>送检检验)*"
)]
[
ExcelColumn
(
"是否送检*(1=>人工检验2=>送检检验)*"
)]
public
string
isinpect
{
get
;
set
;
}
public
string
isinpect
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_machine_property.cs
View file @
245ebee1
...
@@ -19,11 +19,11 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -19,11 +19,11 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
/// </summary>
public
int
propertytype
{
get
;
set
;
}
public
int
propertytype
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 上料状态 1 当前是上料 2
上料中 3
安装完成
/// 上料状态 1 当前是上料 2 安装完成
/// </summary>
/// </summary>
public
int
upload
{
get
;
set
;
}
public
int
upload
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 下料状态 1 当前是下料 2
下料中 3
拆卸完成
/// 下料状态 1 当前是下料 2 拆卸完成
/// </summary>
/// </summary>
public
int
down
{
get
;
set
;
}
public
int
down
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_task_list.cs
View file @
245ebee1
...
@@ -88,7 +88,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -88,7 +88,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// <summary>
/// <summary>
/// 完成时间
/// 完成时间
/// </summary>
/// </summary>
public
DateTime
?
completetime
{
get
;
set
;
}
public
DateTime
completetime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 操作人
/// 操作人
/// </summary>
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
245ebee1
...
@@ -233,6 +233,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -233,6 +233,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponsePlanlFixtureInfo
select
new
ResponsePlanlFixtureInfo
{
{
OrderNumber
=
d
.
OrderNumber
,
OrderNumber
=
d
.
OrderNumber
,
ProductName
=
p
.
product_name
,
ProductName
=
p
.
product_name
,
Url
=
pd
.
image
,
Url
=
pd
.
image
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
245ebee1
...
@@ -35,7 +35,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -35,7 +35,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
from
u
in
uu
.
DefaultIfEmpty
()
from
u
in
uu
.
DefaultIfEmpty
()
join
r
in
_context
.
siger_project_product_route
on
q
.
routeid
equals
r
.
id
into
rr
join
r
in
_context
.
siger_project_product_route
on
q
.
routeid
equals
r
.
id
into
rr
from
r
in
rr
.
DefaultIfEmpty
()
from
r
in
rr
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
V
alid
where
q
.
projectId
==
projectid
&&
q
.
status
!=
(
int
)
RowState
.
Inv
alid
select
new
ResponseAutomationLocation
select
new
ResponseAutomationLocation
{
{
id
=
q
.
id
,
id
=
q
.
id
,
...
@@ -251,7 +251,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -251,7 +251,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join
r
in
_context
.
siger_project_product_route
on
q
.
routeid
equals
r
.
id
into
rtemp
join
r
in
_context
.
siger_project_product_route
on
q
.
routeid
equals
r
.
id
into
rtemp
from
r
in
rtemp
.
DefaultIfEmpty
()
from
r
in
rtemp
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectId
where
q
.
projectId
==
projectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
l
.
status
==
(
int
)
RowState
.
Valid
&&
w
.
status
==
(
int
)
RowState
.
Valid
&&
l
.
status
==
(
int
)
RowState
.
Valid
&&
w
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocationList
select
new
ResponseAutomationLocationList
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationTaskListRepository.cs
View file @
245ebee1
...
@@ -142,6 +142,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -142,6 +142,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
from
r
in
rtemp
.
DefaultIfEmpty
()
from
r
in
rtemp
.
DefaultIfEmpty
()
join
s
in
_context
.
siger_project_level_section
on
q
.
sectionid
equals
s
.
id
join
s
in
_context
.
siger_project_level_section
on
q
.
sectionid
equals
s
.
id
join
lv
in
_context
.
siger_project_level_section
on
s
.
parentid
equals
lv
.
id
join
lv
in
_context
.
siger_project_level_section
on
s
.
parentid
equals
lv
.
id
join
fs
in
_context
.
siger_project_level_section
on
q
.
extend1
equals
fs
.
id
.
ToString
()
into
fstemp
from
fs
in
fstemp
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
where
q
.
projectId
==
projectid
select
new
ResponseAutomationTasklist
select
new
ResponseAutomationTasklist
{
{
...
@@ -153,7 +155,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -153,7 +155,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
triggervalue
=
q
.
triggertime
,
triggervalue
=
q
.
triggertime
,
triggerTime
=
q
.
triggertime
==
DateTime
.
MinValue
?
""
:
q
.
triggertime
.
ToString
(),
triggerTime
=
q
.
triggertime
==
DateTime
.
MinValue
?
""
:
q
.
triggertime
.
ToString
(),
complatevalue
=
q
.
completetime
,
complatevalue
=
q
.
completetime
,
complatetime
=
q
.
completetime
==
DateTime
.
MinValue
?
""
:
q
.
completetime
.
ToString
(),
complatetime
=
q
.
completetime
==
DateTime
.
MinValue
?
""
:
q
.
completetime
.
ToString
(
UnixTimeHelper
.
DateTimeFormat
),
action
=
EnumHelper
.
GetEnumDesc
(
q
.
action
),
action
=
EnumHelper
.
GetEnumDesc
(
q
.
action
),
actionType
=
EnumHelper
.
GetEnumDesc
(
q
.
actiontype
),
actionType
=
EnumHelper
.
GetEnumDesc
(
q
.
actiontype
),
fixtureCode
=
t
.
code
,
fixtureCode
=
t
.
code
,
...
@@ -168,7 +170,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -168,7 +170,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
tasktype
=
EnumHelper
.
GetEnumDesc
(
q
.
tasktype
),
tasktype
=
EnumHelper
.
GetEnumDesc
(
q
.
tasktype
),
tasktypeid
=
Convert
.
ToInt32
(
q
.
tasktype
),
tasktypeid
=
Convert
.
ToInt32
(
q
.
tasktype
),
status
=
q
.
status
,
status
=
q
.
status
,
actionTypeid
=
Convert
.
ToInt32
(
q
.
actiontype
)
actionTypeid
=
Convert
.
ToInt32
(
q
.
actiontype
),
productName
=
q
.
productname
,
fromsection
=
fs
!=
null
?
fs
.
title
:
""
,
};
};
Expression
<
Func
<
ResponseAutomationTasklist
,
bool
>>
sectonsExpression
=
f
=>
true
;
Expression
<
Func
<
ResponseAutomationTasklist
,
bool
>>
sectonsExpression
=
f
=>
true
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationFixtureDetails.cs
0 → 100644
View file @
245ebee1
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Siger.Middlelayer.AccRepository.Response
{
public
class
ResponseAutomationFixtureDetails
{
/// <summary>
/// 父工装类别
/// </summary>
public
string
parentType
{
get
;
set
;
}
/// <summary>
/// 父工装编号
/// </summary>
public
string
parentCode
{
get
;
set
;
}
/// <summary>
/// 父级工装名称
/// </summary>
public
string
parentName
{
get
;
set
;
}
/// <summary>
/// 父级工装类别
/// </summary>
public
string
parentSpecl
{
get
;
set
;
}
public
string
child
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationSnhistory.cs
0 → 100644
View file @
245ebee1
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Siger.Middlelayer.AccRepository.Response
{
public
class
ResponseAutomationSnhistory
{
public
string
productCode
{
get
;
set
;
}
public
string
productName
{
get
;
set
;
}
public
string
section
{
get
;
set
;
}
public
string
fixtureCode
{
get
;
set
;
}
public
string
sn
{
get
;
set
;
}
public
string
program
{
get
;
set
;
}
public
string
route
{
get
;
set
;
}
public
string
datetime
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationTasklist.cs
View file @
245ebee1
...
@@ -47,5 +47,11 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -47,5 +47,11 @@ namespace Siger.Middlelayer.AccRepository.Response
public
DateTime
?
complatevalue
{
get
;
set
;
}
public
DateTime
?
complatevalue
{
get
;
set
;
}
public
string
complatetime
{
get
;
set
;
}
public
string
complatetime
{
get
;
set
;
}
public
int
send
{
get
;
set
;
}
public
int
send
{
get
;
set
;
}
//0 自动,1,手动执行
public
int
excute
{
get
;
set
;
}
/// <summary>
/// 发起工站
/// </summary>
public
string
fromsection
{
get
;
set
;
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.QmsRepository/Repositories/InspectStandardRepository.cs
View file @
245ebee1
...
@@ -219,6 +219,17 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -219,6 +219,17 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
seq
))
{
errors
.
Add
(
$"
{
rowIndex
}
,
{
8223
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
if
(!
int
.
TryParse
(
item
.
seq
,
out
int
intSeq
)
||
item
.
seq
.
ToInt
()
<=
0
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{
8224
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
var
itemPinYin
=
PinYinHelper
.
ToPinYin
(
item
.
item
);
var
itemPinYin
=
PinYinHelper
.
ToPinYin
(
item
.
item
);
if
(
string
.
IsNullOrWhiteSpace
(
itemPinYin
))
if
(
string
.
IsNullOrWhiteSpace
(
itemPinYin
))
{
{
...
@@ -262,7 +273,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -262,7 +273,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
MaxMinError
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
MaxMinError
}
"
);
}
}
if
((
p
.
value_category
.
ToInt
()
==
(
int
)
ValueCategory
.
Maxmin
&&
string
.
IsNullOrEmpty
(
p
.
range
))
||
p
.
seq
<=
0
||
if
((
p
.
value_category
.
ToInt
()
==
(
int
)
ValueCategory
.
Maxmin
&&
string
.
IsNullOrEmpty
(
p
.
range
))
||
p
.
seq
.
ToInt
()
<=
0
||
(
p
.
value_type
.
ToInt
()
==
(
int
)
ValueTypeStatus
.
V
&&
p
.
value_category
.
ToInt
()
<=
0
)
||
(
p
.
value_type
.
ToInt
()
==
(
int
)
ValueTypeStatus
.
V
&&
p
.
value_category
.
ToInt
()
<=
0
)
||
string
.
IsNullOrWhiteSpace
(
p
.
lcl
)
&&
!
string
.
IsNullOrWhiteSpace
(
p
.
ucl
)
||
string
.
IsNullOrWhiteSpace
(
p
.
lcl
)
&&
!
string
.
IsNullOrWhiteSpace
(
p
.
ucl
))
string
.
IsNullOrWhiteSpace
(
p
.
lcl
)
&&
!
string
.
IsNullOrWhiteSpace
(
p
.
ucl
)
||
string
.
IsNullOrWhiteSpace
(
p
.
lcl
)
&&
!
string
.
IsNullOrWhiteSpace
(
p
.
ucl
))
{
{
...
@@ -277,7 +288,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -277,7 +288,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
InspectItemRepeat
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
InspectItemRepeat
}
"
);
}
}
var
querySeq
=
_context
.
siger_qms_inspection_standard
.
FirstOrDefault
(
t
=>
t
.
seq
==
p
.
seq
&&
var
querySeq
=
_context
.
siger_qms_inspection_standard
.
FirstOrDefault
(
t
=>
t
.
seq
==
p
.
seq
.
ToInt
()
&&
t
.
projectid
==
projectid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
productid
==
p
.
productid
&&
t
.
projectid
==
projectid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
productid
==
p
.
productid
&&
t
.
sectionid
==
p
.
sectionid
&&
t
.
standard_type
==
p
.
isinpect
.
ToInt
());
t
.
sectionid
==
p
.
sectionid
&&
t
.
standard_type
==
p
.
isinpect
.
ToInt
());
if
(
querySeq
!=
null
||
standardList
.
Count
(
t
=>
t
.
seq
==
p
.
seq
&&
if
(
querySeq
!=
null
||
standardList
.
Count
(
t
=>
t
.
seq
==
p
.
seq
&&
...
@@ -302,10 +313,10 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -302,10 +313,10 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
{
{
if
(
p
.
value_type
==
"3"
)
if
(
p
.
value_type
==
"3"
)
{
{
var
standard
=
_context
.
siger_qms_inspection_standard
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
).
FirstOrDefault
();
var
standard
=
_context
.
siger_qms_inspection_standard
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
.
ToInt
()
).
FirstOrDefault
();
if
(
standard
==
null
)
if
(
standard
==
null
)
{
{
var
data
=
entities
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
).
FirstOrDefault
();
var
data
=
entities
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
.
ToInt
()
).
FirstOrDefault
();
if
(
data
!=
null
)
if
(
data
!=
null
)
{
{
continue
;
continue
;
...
@@ -317,7 +328,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -317,7 +328,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
productcode
=
p
.
productcode
,
productcode
=
p
.
productcode
,
sectionid
=
p
.
sectionid
,
sectionid
=
p
.
sectionid
,
standard
=
p
.
standard
,
standard
=
p
.
standard
,
seq
=
p
.
seq
,
seq
=
p
.
seq
.
ToInt
()
,
item
=
p
.
item
??
""
,
item
=
p
.
item
??
""
,
item_en
=
p
.
item_en
,
item_en
=
p
.
item_en
,
unit
=
p
.
unit
??
""
,
unit
=
p
.
unit
??
""
,
...
@@ -352,7 +363,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -352,7 +363,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
productcode
=
p
.
productcode
,
productcode
=
p
.
productcode
,
sectionid
=
p
.
sectionid
,
sectionid
=
p
.
sectionid
,
standard
=
p
.
standard
,
standard
=
p
.
standard
,
seq
=
p
.
seq
,
seq
=
p
.
seq
.
ToInt
()
,
item
=
p
.
item
??
""
,
item
=
p
.
item
??
""
,
item_en
=
p
.
item_en
,
item_en
=
p
.
item_en
,
unit
=
p
.
unit
??
""
,
unit
=
p
.
unit
??
""
,
...
@@ -386,7 +397,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -386,7 +397,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
{
{
if
(
p
.
value_type
==
"3"
)
if
(
p
.
value_type
==
"3"
)
{
{
var
standard
=
_context
.
siger_qms_inspection_standard
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
&&
q
.
status
==(
int
)
RowState
.
Valid
).
FirstOrDefault
();
var
standard
=
_context
.
siger_qms_inspection_standard
.
Where
(
q
=>
q
.
value_type
==
3
&&
q
.
productcode
==
p
.
productcode
&&
q
.
sectionid
==
p
.
sectionid
&&
q
.
seq
==
p
.
seq
.
ToInt
()
&&
q
.
status
==(
int
)
RowState
.
Valid
).
FirstOrDefault
();
var
option
=
new
siger_qms_inspection_standard_option
var
option
=
new
siger_qms_inspection_standard_option
{
{
standardid
=
standard
.
id
,
standardid
=
standard
.
id
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.Repository/Response/ResponseLoadStation.cs
View file @
245ebee1
...
@@ -20,8 +20,13 @@ namespace Siger.Middlelayer.Repository.Response
...
@@ -20,8 +20,13 @@ namespace Siger.Middlelayer.Repository.Response
public
int
status
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
/// <summary>
/// <summary>
///
1 :可以上料 2:可以下料
///
上料状态
/// </summary>
/// </summary>
public
int
upload
{
get
;
set
;
}
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