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
0b279d64
Commit
0b279d64
authored
Feb 05, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixedbug
parent
971259e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
80 deletions
+67
-80
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+36
-32
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+30
-47
siger_automation_machine_property.cs
...cRepository/Entities/siger_automation_machine_property.cs
+1
-1
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
0b279d64
This diff is collapsed.
Click to expand it.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
0b279d64
...
...
@@ -82,70 +82,53 @@ namespace Siger.ApiACC.Controllers
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置设备类型字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
loadStation
=
new
List
<
string
>();
//上下料
if
(
type
==
0
)
{
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
if
(!
dictLoad
.
Any
())
var
sectionProperty
=
_sectionPropertyRepository
.
GetList
(
f
=>
f
.
propertytype
==
1
);
var
sections
=
sectionProperty
.
Select
(
s
=>
s
.
sectionid
).
ToList
();
var
levelSection
=
_sigerProjectLevelSection
.
GetList
(
f
=>
f
.
parentid
==
line
&&
sections
.
Contains
(
f
.
id
));
if
(!
levelSection
.
Any
())
{
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置上下料工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
}
else
{
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
CleanStation
);
if
(!
dictLoad
.
Any
())
var
result
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
lv
in
levelSection
)
{
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置清洗工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
result
.
Add
(
new
ResponseLoadStation
{
section
=
lv
.
id
,
status
=
1
,
title
=
lv
.
title
,
});
}
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
return
new
ObjectResult
(
result
);
//检验
}
var
data
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
station
in
loadStation
)
else
{
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
station
.
ToInt
()
&&
f
.
parentid
==
line
&&
f
.
status
==
(
int
)
RowState
.
Valid
);
if
(
section
==
null
)
continue
;
var
machintAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
section
.
id
);
if
(
machintAttr
==
null
)
var
sectionProperty
=
_sectionPropertyRepository
.
GetList
(
f
=>
f
.
propertytype
==
3
);
var
sections
=
sectionProperty
.
Select
(
s
=>
s
.
sectionid
).
ToList
();
var
levelSection
=
_sigerProjectLevelSection
.
GetList
(
f
=>
f
.
parentid
==
line
&&
sections
.
Contains
(
f
.
id
));
if
(!
levelSection
.
Any
())
{
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置工站字典"
);
continue
;
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
loadStatus
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
section
.
id
);
if
(
machineStatus
==
null
)
var
result
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
lv
in
levelSection
)
{
_automationMachineStatus
.
Insert
(
new
siger_automation_machine_status
result
.
Add
(
new
ResponseLoadStation
{
projectId
=
ProjectId
,
enable
=
1
,
machineid
=
machintAttr
.
machine
,
section
=
section
.
id
,
updatetime
=
DateTime
.
Now
});
}
else
{
section
=
lv
.
id
,
status
=
1
,
title
=
lv
.
title
,
loadStatus
=
machineStatus
.
status
;
})
;
}
data
.
Add
(
new
ResponseLoadStation
{
section
=
section
.
id
,
title
=
section
.
title
,
status
=
loadStatus
});
return
new
ObjectResult
(
result
);
}
_unitOfWork
.
Commit
();
return
new
ObjectResult
(
data
);
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_machine_property.cs
View file @
0b279d64
...
...
@@ -15,7 +15,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
public
int
sectionid
{
get
;
set
;
}
/// <summary>
/// 1:上下料工位2:加工工位3:检验工位4:
装配工位
5:存储工位
/// 1:上下料工位2:加工工位3:检验工位4:
清洗
5:存储工位
/// </summary>
public
int
propertytype
{
get
;
set
;
}
/// <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