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
7c623c3d
Commit
7c623c3d
authored
Feb 23, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
f2c648f0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
122 additions
and
7 deletions
+122
-7
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+39
-2
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+10
-1
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+11
-0
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
siger_automation_task_list.cs
...ayer.AccRepository/Entities/siger_automation_task_list.cs
+1
-1
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
+4
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
7c623c3d
...
...
@@ -44,10 +44,11 @@ namespace Siger.ApiACC.Controllers
private
readonly
IProductRouteRepository
_productRoute
;
private
readonly
IAutomationSectionPropertyRepository
_automationSectionProperty
;
private
readonly
IAutomationProduceHistoryRepository
_automationProduceHistory
;
private
readonly
ISigerProjectProductReport
_sigerProjectProduct
;
public
AutomationController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationLineMode
automationLineMode
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerDict
sigerDict
,
IAutomationTaskListRepository
automationTaskList
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationLocationRepository
automationLocation
,
IProductionBeatSetRepository
productionBeatSet
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
,
IAutomationFixtureToolsRepository
automationFixtureTools
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
automationSectionProperty
,
IAutomationProduceHistoryRepository
automationProduceHistory
)
IAutomationFixtureToolsRepository
automationFixtureTools
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
automationSectionProperty
,
IAutomationProduceHistoryRepository
automationProduceHistory
,
ISigerProjectProductReport
sigerProjectProduct
)
{
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
...
...
@@ -64,6 +65,7 @@ namespace Siger.ApiACC.Controllers
_productRoute
=
productRoute
;
_automationSectionProperty
=
automationSectionProperty
;
_automationProduceHistory
=
automationProduceHistory
;
_sigerProjectProduct
=
sigerProjectProduct
;
}
/// <summary>
...
...
@@ -335,7 +337,11 @@ namespace Siger.ApiACC.Controllers
sectionProperty
.
down
=
0
;
_automationSectionProperty
.
Update
(
sectionProperty
);
if
(
machineStatusObj
!=
null
)
{
machineStatusObj
.
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
_automationMachineStatus
.
Update
(
machineStatusObj
);
}
}
//从立库储位拿SN 工件到上料位
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
...
...
@@ -387,6 +393,37 @@ namespace Siger.ApiACC.Controllers
location
.
status
=
(
int
)
LocationStatus
.
Out
;
_automationLocation
.
Update
(
location
);
}
if
(
taskObj
.
action
==
TaskAction
.
Step_JGZX_QXJ
)
{
var
planDts
=
_
//插入报工记录
var
entity
=
new
siger_project_product_report
{
draw_number
=
""
,
plan_id
=
0
,
product_name
=
taskObj
.
productname
,
code
=
taskObj
.
ordercode
,
end_time
=
UnixTimeHelper
.
GetNow
(),
station
=
taskObj
.
sectionid
,
industrial_waste
=
0
,
material_waste
=
0
,
start_time
=
UnixTimeHelper
.
GetNow
(),
worker_code
=
""
,
worker_name
=
""
,
uid
=
0
,
projectid
=
PID
,
time
=
UnixTimeHelper
.
GetNow
(),
processid
=
0
,
nok_number
=
0
,
output
=
1
,
actual_output
=
1
,
product_code
=
taskObj
.
productcode
};
if
(
_sigerProjectProduct
.
InsertProductReportData
(
entity
)
<
0
)
{
throw
new
BadRequestException
(
AccEnum
.
SyncSnReportErro
);
}
}
}
//抽检台
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
7c623c3d
...
...
@@ -46,10 +46,11 @@ namespace Siger.ApiACC.Controllers
private
readonly
IProductRouteRepository
_productRoute
;
private
readonly
IAutomationSectionPropertyRepository
_sectionPropertyRepository
;
private
readonly
IAutomationProduceHistoryRepository
_automationProduceHistory
;
private
readonly
ISigerProjectProductRepository
_sigerProjectProduct
;
public
AutomationOperateController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
ISigerDict
sigerDict
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationTaskListRepository
automationTaskList
,
IProductPlanDetails
planDetails
,
IProductPlanRepository
productPlan
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
,
IAutomationFixtureToolsRepository
automationFixtureTools
,
IAutomationLocationRepository
automationLocation
,
IAutomationLineMode
automationLine
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
sectionPropertyRepository
,
IAutomationProduceHistoryRepository
automationProduceHistory
)
IAutomationLineMode
automationLine
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
sectionPropertyRepository
,
IAutomationProduceHistoryRepository
automationProduceHistory
,
ISigerProjectProductRepository
sigerProjectProduct
)
{
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
...
...
@@ -67,6 +68,7 @@ namespace Siger.ApiACC.Controllers
_productRoute
=
productRoute
;
_sectionPropertyRepository
=
sectionPropertyRepository
;
_automationProduceHistory
=
automationProduceHistory
;
_sigerProjectProduct
=
sigerProjectProduct
;
}
/// <summary>
...
...
@@ -151,6 +153,12 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
monitor
=
_automationTaskList
.
GetList
(
f
=>
f
.
sectionid
==
section
,
"id"
,
true
).
FirstOrDefault
();
var
img
=
string
.
Empty
;
if
(
monitor
!=
null
)
{
var
pd
=
_sigerProjectProduct
.
Get
(
f
=>
f
.
code
==
monitor
.
productcode
);
img
=
pd
!=
null
?
pd
.
image
:
""
;
}
var
result
=
new
ResponsePlanlFixtureInfo
{
OrderNumber
=
monitor
!=
null
?
monitor
.
ordercode
:
""
,
...
...
@@ -161,6 +169,7 @@ namespace Siger.ApiACC.Controllers
Sn
=
monitor
!=
null
?
monitor
.
sn
:
""
,
status
=
monitor
!=
null
?
monitor
.
status
:
0
,
Location
=
monitor
!=
null
?
monitor
.
locationid
:
0
,
Url
=
img
};
return
new
ObjectResult
(
result
);
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
7c623c3d
...
...
@@ -101,6 +101,17 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
output
);
}
[
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
)
{
var
ids
=
new
List
<
int
>();
...
...
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
7c623c3d
...
...
@@ -357,7 +357,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"工序加工未完成"
)]
RouteProcessing
,
[
Description
(
"工序未开始加工"
)]
RouteNotStart
RouteNotStart
,
[
Description
(
"同步报工记录失败"
)]
SyncSnReportErro
}
public
enum
SeriNumCfg
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_task_list.cs
View file @
7c623c3d
...
...
@@ -88,7 +88,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// <summary>
/// 完成时间
/// </summary>
public
DateTime
?
completetime
{
get
;
set
;
}
public
DateTime
completetime
{
get
;
set
;
}
/// <summary>
/// 操作人
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationTaskListRepository.cs
View file @
7c623c3d
...
...
@@ -142,6 +142,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
from
r
in
rtemp
.
DefaultIfEmpty
()
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
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
select
new
ResponseAutomationTasklist
{
...
...
@@ -153,7 +155,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
triggervalue
=
q
.
triggertime
,
triggerTime
=
q
.
triggertime
==
DateTime
.
MinValue
?
""
:
q
.
triggertime
.
ToString
(),
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
),
actionType
=
EnumHelper
.
GetEnumDesc
(
q
.
actiontype
),
fixtureCode
=
t
.
code
,
...
...
@@ -168,7 +170,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
tasktype
=
EnumHelper
.
GetEnumDesc
(
q
.
tasktype
),
tasktypeid
=
Convert
.
ToInt32
(
q
.
tasktype
),
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
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationFixtureDetails.cs
0 → 100644
View file @
7c623c3d
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 @
7c623c3d
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 @
7c623c3d
...
...
@@ -49,5 +49,9 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
send
{
get
;
set
;
}
//0 自动,1,手动执行
public
int
excute
{
get
;
set
;
}
/// <summary>
/// 发起工站
/// </summary>
public
string
fromsection
{
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