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
79cce1d0
Commit
79cce1d0
authored
Jan 28, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
e8eb7746
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
15 deletions
+19
-15
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+5
-2
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+3
-3
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+1
-1
AutomationMachineStatusRepository.cs
...ository/Repositories/AutomationMachineStatusRepository.cs
+3
-2
AutomationTaskListRepository.cs
...ccRepository/Repositories/AutomationTaskListRepository.cs
+7
-7
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
79cce1d0
...
@@ -315,8 +315,11 @@ namespace Siger.ApiACC.Controllers
...
@@ -315,8 +315,11 @@ namespace Siger.ApiACC.Controllers
_automationLocation
.
Update
(
location
);
_automationLocation
.
Update
(
location
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
monitor
.
section
=
0
;
if
(
monitor
!=
null
)
_automationFixtureMonitor
.
Update
(
monitor
);
{
monitor
.
section
=
0
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
}
}
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
79cce1d0
...
@@ -193,7 +193,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -193,7 +193,7 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
LineIsAutoMode
);
throw
new
BadRequestException
(
AccEnum
.
LineIsAutoMode
);
}
}
var
host
=
GetHost
();
var
host
=
GetHost
();
if
(
string
.
IsNullOrEmpty
(
host
))
if
(
string
.
IsNullOrEmpty
(
host
))
{
{
...
@@ -268,7 +268,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -268,7 +268,7 @@ namespace Siger.ApiACC.Controllers
[
HttpGet
]
[
HttpGet
]
public
IActionResult
ScanCode
(
string
code
,
int
id
)
public
IActionResult
ScanCode
(
string
code
,
int
id
)
{
{
if
(
string
.
IsNullOrEmpty
(
code
))
if
(
!
string
.
IsNullOrEmpty
(
code
))
{
{
var
result
=
_automationFixtureToolsProduct
.
GetPlanFixtureInfo
(
ProjectId
,
code
);
var
result
=
_automationFixtureToolsProduct
.
GetPlanFixtureInfo
(
ProjectId
,
code
);
if
(
result
==
null
)
if
(
result
==
null
)
...
@@ -471,7 +471,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -471,7 +471,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
}
//移出 上料位
//移出 上料位
monitor
.
section
=
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
{
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
79cce1d0
...
@@ -50,7 +50,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -50,7 +50,7 @@ namespace Siger.ApiACC.Controllers
var
item
=
new
ResponseAutomationMachineStatus
var
item
=
new
ResponseAutomationMachineStatus
{
{
sectionid
=
d
.
sectionid
,
sectionid
=
d
.
sectionid
,
section
=
$"
{
d
.
section
}
(
{
d
.
linemode
}
)
"
,
section
=
$"
{
d
.
section
}
{
d
.
linemode
}
"
,
enable
=
d
.
enable
,
enable
=
d
.
enable
,
product
=
""
,
product
=
""
,
location
=
0
,
location
=
0
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationMachineStatusRepository.cs
View file @
79cce1d0
...
@@ -22,7 +22,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -22,7 +22,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
{
var
data
=
from
atr
in
_context
.
siger_project_machine_attribution
var
data
=
from
atr
in
_context
.
siger_project_machine_attribution
join
lv
in
_context
.
siger_project_level_section
on
atr
.
station
equals
lv
.
id
join
lv
in
_context
.
siger_project_level_section
on
atr
.
station
equals
lv
.
id
join
lm
in
_context
.
siger_automation_line_mode
on
lv
.
parentid
equals
lm
.
id
join
lm
in
_context
.
siger_automation_line_mode
on
lv
.
parentid
equals
lm
.
id
into
lstemp
from
lm
in
lstemp
.
DefaultIfEmpty
()
join
ms
in
_context
.
siger_automation_machine_status
on
lv
.
id
equals
ms
.
section
into
mstemp
join
ms
in
_context
.
siger_automation_machine_status
on
lv
.
id
equals
ms
.
section
into
mstemp
join
plv
in
_context
.
siger_project_level_section
on
lv
.
parentid
equals
plv
.
id
join
plv
in
_context
.
siger_project_level_section
on
lv
.
parentid
equals
plv
.
id
from
ms
in
mstemp
.
DefaultIfEmpty
()
from
ms
in
mstemp
.
DefaultIfEmpty
()
...
@@ -33,7 +34,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -33,7 +34,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
lastupdate
=
ms
!=
null
?
ms
.
updatetime
.
ToString
()
:
""
,
lastupdate
=
ms
!=
null
?
ms
.
updatetime
.
ToString
()
:
""
,
enable
=
ms
!=
null
?
ms
.
enable
:
1
,
enable
=
ms
!=
null
?
ms
.
enable
:
1
,
status
=
ms
!=
null
?
ms
.
status
:
1
,
status
=
ms
!=
null
?
ms
.
status
:
1
,
linemode
=
lm
.
mode
==
0
?
"手动模式"
:
"自动模式
"
,
linemode
=
lm
!=
null
?
lm
.
mode
==
0
?
"手动模式"
:
"自动模式"
:
"
"
,
};
};
Expression
<
Func
<
ResponseAutomationMachineStatus
,
bool
>>
sectionsExpression
=
f
=>
true
;
Expression
<
Func
<
ResponseAutomationMachineStatus
,
bool
>>
sectionsExpression
=
f
=>
true
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationTaskListRepository.cs
View file @
79cce1d0
...
@@ -49,15 +49,15 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -49,15 +49,15 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public
string
CrateTaskNumber
(
TaskTrigerType
trigerType
)
public
string
CrateTaskNumber
(
TaskTrigerType
trigerType
)
{
{
var
date
=
DateTime
.
Now
;
var
date
=
DateTime
.
Now
;
var
lable
=
date
.
Year
+
date
.
Day
+
date
.
Hour
+
date
.
Minute
+
date
.
Second
;
var
serinum
=
date
.
DayOfYear
+
date
.
Month
+
date
.
Day
+
date
.
Hour
+
date
.
Minute
+
date
.
Second
+
date
.
Millisecond
;
var
lableUnix
=
UnixTimeHelper
.
GetNow
();
var
dayofyear
=
GetDayOfYear
(
date
);
if
(
trigerType
==
TaskTrigerType
.
Auto
)
if
(
trigerType
==
TaskTrigerType
.
Auto
)
{
{
return
$"
{
date
.
Year
}{
date
.
DayOfYear
}
A
{
lable
}
"
;
return
$"A
{
date
.
Year
}{
dayofyear
}{
serinum
}
"
;
}
else
}
else
{
{
return
$"
{
date
.
Year
}{
date
.
DayOfYear
}
M
{
lable
}
"
;
return
$"
M
{
date
.
Year
}{
dayofyear
}{
serinum
}
"
;
}
}
}
}
/// <summary>
/// <summary>
...
@@ -68,7 +68,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -68,7 +68,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public
string
CreateRandonSn
(
string
productCode
)
public
string
CreateRandonSn
(
string
productCode
)
{
{
var
date
=
DateTime
.
Now
;
var
date
=
DateTime
.
Now
;
var
serinum
=
date
.
DayOfYear
+
date
.
Hour
+
date
.
Minute
+
date
.
Second
+
date
.
Millisecond
;
var
serinum
=
date
.
DayOfYear
+
date
.
Month
+
date
.
Day
+
date
.
Hour
+
date
.
Minute
+
date
.
Second
+
date
.
Millisecond
;
var
dayofyear
=
GetDayOfYear
(
date
);
var
dayofyear
=
GetDayOfYear
(
date
);
var
lable
=
$"
{
date
.
Year
}{
dayofyear
}{
serinum
}
"
;
var
lable
=
$"
{
date
.
Year
}{
dayofyear
}{
serinum
}
"
;
return
lable
;
return
lable
;
...
...
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