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
043d65cf
Commit
043d65cf
authored
Jan 28, 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
297004b3
edc534b6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
185 additions
and
7 deletions
+185
-7
storagemaintenance.vue
Html/src/view/wms/config/storagemaintenance.vue
+1
-1
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+1
-1
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+162
-3
LocationController.cs
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
+8
-1
DictKeyValConst.cs
...ommon/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
+5
-0
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+2
-0
requestAutoLoad.cs
...iger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
+2
-0
ResponseProductFixtureInfo.cs
...ayer.AccRepository/Response/ResponseProductFixtureInfo.cs
+1
-0
No files found.
Html/src/view/wms/config/storagemaintenance.vue
View file @
043d65cf
...
@@ -412,7 +412,7 @@ export default {
...
@@ -412,7 +412,7 @@ export default {
loadexcel
()
{
loadexcel
()
{
axios
axios
.
request
({
.
request
({
url
:
"/
config/Download/GetTemplate?name=StorageLocation
"
,
url
:
"/
wms/Location/DownloadTemplate
"
,
method
:
"get"
,
method
:
"get"
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
043d65cf
...
@@ -428,7 +428,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -428,7 +428,7 @@ namespace Siger.ApiACC.Controllers
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
}
}
//优先级3:其他设备下料 (加工中心 ->
立库
)
//优先级3:其他设备下料 (加工中心 ->
清洗机
)
if
(
cleanMachine
!=
null
)
if
(
cleanMachine
!=
null
)
{
{
var
fullMachine
=
machineStatusList
.
FirstOrDefault
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
);
var
fullMachine
=
machineStatusList
.
FirstOrDefault
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
);
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
043d65cf
...
@@ -21,6 +21,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum;
...
@@ -21,6 +21,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum;
using
Siger.Middlelayer.Common.Configuration
;
using
Siger.Middlelayer.Common.Configuration
;
using
Siger.Middlelayer.Common.Helpers
;
using
Siger.Middlelayer.Common.Helpers
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
NPOI.SS.Formula
;
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
{
{
...
@@ -452,7 +453,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -452,7 +453,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
}
//移出 上料位
//移出 上料位
monitor
.
s
tatus
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
monitor
.
s
ection
=
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
{
{
...
@@ -500,8 +501,109 @@ namespace Siger.ApiACC.Controllers
...
@@ -500,8 +501,109 @@ namespace Siger.ApiACC.Controllers
[
HttpPost
]
[
HttpPost
]
public
IActionResult
Unloading
([
FromBody
]
requestAutomationUnloading
unloading
)
public
IActionResult
Unloading
([
FromBody
]
requestAutomationUnloading
unloading
)
{
{
//var monitor = _automationFixtureMonitor.Get(f => f.section == unloading.section);
//if (monitor == null)
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
//if (string.IsNullOrEmpty( monitor.sn))
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控SN信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
return
new
ObjectResult
(
1
);
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
locationid
==
unloading
.
locationid
);
if
(
location
==
null
)
{
return
new
ObjectResult
(
CommonEnum
.
RecordNotFound
);
}
if
(
string
.
IsNullOrEmpty
(
location
.
sn
))
{
return
new
ObjectResult
(
AccEnum
.
LocationNoSn
);
}
var
levelSection
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
unloading
.
section
);
var
lineMode
=
_automationLine
.
Get
(
f
=>
f
.
section
==
levelSection
.
parentid
);
if
(
lineMode
==
null
)
{
return
new
ObjectResult
(
AccEnum
.
LineModeNotfound
);
}
//TODO
//1. 有检验状态 (立库-》检验工位)
//2. 无检验状态 (立库-》上下料工位)
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
no
=
taskNo
,
action
=
lineMode
.
inspect
==
1
?
Automation
.
TaskAction
.
Step_LK_CJT
:
Automation
.
TaskAction
.
Step_LK_SXLW
,
actiontype
=
Automation
.
ExcueType
.
None
,
triggertime
=
DateTime
.
Now
,
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
MinValue
,
sectionid
=
unloading
.
section
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
productid
=
location
.
productid
,
sn
=
location
.
sn
,
ordercode
=
location
.
ordernumber
,
fixtureguid
=
location
.
fixturetools
,
locationid
=
location
.
locationid
,
productcode
=
location
.
productcode
,
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-准备上料"
,
});
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
unloading
.
section
);
if
(
monitor
==
null
)
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
fixtureguid
=
location
.
fixturetools
,
fixturename
=
location
.
fixturename
,
projectId
=
ProjectId
,
section
=
unloading
.
section
,
sn
=
location
.
sn
,
createtime
=
DateTime
.
Now
,
updatetime
=
DateTime
.
Now
,
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
,
productId
=
location
.
productid
,
productCode
=
location
.
productcode
,
productName
=
location
.
productname
,
ordernumber
=
location
.
ordernumber
,
locationId
=
location
.
locationid
});
}
else
{
monitor
.
sn
=
location
.
sn
;
monitor
.
updatetime
=
DateTime
.
Now
;
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
monitor
.
productId
=
location
.
productid
;
monitor
.
productName
=
location
.
productname
;
monitor
.
productCode
=
location
.
productcode
;
monitor
.
ordernumber
=
location
.
ordernumber
;
monitor
.
locationId
=
location
.
locationid
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
if
(
_unitOfWork
.
Commit
()
>
0
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
}
/// <summary>
/// <summary>
...
@@ -513,7 +615,64 @@ namespace Siger.ApiACC.Controllers
...
@@ -513,7 +615,64 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
Disassemble
([
FromBody
]
Requestdisassemble
disassemble
)
public
IActionResult
Disassemble
([
FromBody
]
Requestdisassemble
disassemble
)
{
{
return
new
ObjectResult
(
1
);
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
disassemble
.
section
);
if
(
machineStatus
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
if
(
machineStatus
.
enable
==
0
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
if
(!
_automationTaskList
.
CanTask
(
ProjectId
,
disassemble
.
section
))
{
throw
new
BadRequestException
(
AccEnum
.
TaskProcessing
);
}
//创建 安装完成动作
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
projectId
==
ProjectId
&&
f
.
section
==
disassemble
.
section
);
if
(
monitor
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
//移出 上料位
monitor
.
section
=
0
;
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
.
Now
,
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
Now
,
sectionid
=
disassemble
.
section
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
productid
=
monitor
.
productId
,
sn
=
monitor
.
sn
,
ordercode
=
monitor
.
ordernumber
,
fixtureguid
=
monitor
.
fixtureguid
,
locationid
=
monitor
.
locationId
,
productcode
=
monitor
.
productCode
,
processid
=
0
,
programnumber
=
""
,
remark
=
"手动任务-拆卸完成"
,
});
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
);
}
}
}
}
}
}
}
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
View file @
043d65cf
...
@@ -546,7 +546,14 @@ namespace Siger.ApiWMS.Controllers
...
@@ -546,7 +546,14 @@ namespace Siger.ApiWMS.Controllers
[
HttpGet
]
[
HttpGet
]
public
IActionResult
DownloadTemplate
()
public
IActionResult
DownloadTemplate
()
{
{
var
list
=
new
List
<
List
<
string
>>()
{
GetExcelTitle
()
};
var
data
=
new
List
<
string
>(){
"*ID"
,
"*仓库名称"
};
var
range
=
locationtype
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
projectid
==
ProjectId
).
OrderBy
(
f
=>
f
.
id
).
Select
(
f
=>
"*"
+
f
.
name
).
ToList
();
data
.
AddRange
(
range
);
var
list
=
new
List
<
List
<
string
>>()
{
data
};
var
fileName
=
Utility
.
GetExcelFileName
(
"Location"
);
var
fileName
=
Utility
.
GetExcelFileName
(
"Location"
);
CommonExcelHelper
.
Generate
(
list
,
fileName
);
CommonExcelHelper
.
Generate
(
list
,
fileName
);
...
...
Server/Common/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
View file @
043d65cf
...
@@ -43,5 +43,10 @@ namespace Siger.Middlelayer.Share.Constant
...
@@ -43,5 +43,10 @@ namespace Siger.Middlelayer.Share.Constant
/// </summary>
/// </summary>
public
const
string
WarehouseStation
=
"WarehouseStation"
;
public
const
string
WarehouseStation
=
"WarehouseStation"
;
/// <summary>
/// 检验
/// </summary>
public
const
string
InspectStation
=
"InspectStation"
;
}
}
}
}
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
043d65cf
...
@@ -341,7 +341,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -341,7 +341,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"产线当前为自动模式"
)]
[
Description
(
"产线当前为自动模式"
)]
LineIsAutoMode
,
LineIsAutoMode
,
[
Description
(
"该任务已经下发"
)]
[
Description
(
"该任务已经下发"
)]
TaskIsSend
TaskIsSend
,
[
Description
(
"该储位无工件"
)]
LocationNoSn
,
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
043d65cf
...
@@ -127,12 +127,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -127,12 +127,14 @@ 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
join
pd
in
_context
.
siger_project_product
on
p
.
product_id
equals
pd
.
id
where
q
.
projectId
==
projectId
&&
d
.
OrderNumber
==
ordernumber
where
q
.
projectId
==
projectId
&&
d
.
OrderNumber
==
ordernumber
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
l
.
status
==(
int
)
RowState
.
Valid
&&
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
,
ProductName
=
p
.
product_name
,
ProductName
=
p
.
product_name
,
Url
=
pd
.
image
,
FixtureName
=
t
.
name
,
FixtureName
=
t
.
name
,
FixtureGuid
=
t
.
guid
,
FixtureGuid
=
t
.
guid
,
ProductCode
=
q
!=
null
?
q
.
productcode
:
""
,
ProductCode
=
q
!=
null
?
q
.
productcode
:
""
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/requestAutoLoad.cs
View file @
043d65cf
...
@@ -31,6 +31,8 @@ namespace Siger.Middlelayer.AccRepository.Request
...
@@ -31,6 +31,8 @@ namespace Siger.Middlelayer.AccRepository.Request
{
{
public
int
section
{
get
;
set
;
}
public
int
section
{
get
;
set
;
}
public
int
locationid
{
get
;
set
;
}
}
}
/// <summary>
/// <summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseProductFixtureInfo.cs
View file @
043d65cf
...
@@ -34,6 +34,7 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -34,6 +34,7 @@ namespace Siger.Middlelayer.AccRepository.Response
public
string
OrderNumber
{
get
;
set
;
}
public
string
OrderNumber
{
get
;
set
;
}
public
string
ProductCode
{
get
;
set
;
}
public
string
ProductCode
{
get
;
set
;
}
public
string
ProductName
{
get
;
set
;
}
public
string
ProductName
{
get
;
set
;
}
public
string
Url
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
public
string
FixtureName
{
get
;
set
;
}
public
string
FixtureName
{
get
;
set
;
}
public
string
FixtureGuid
{
get
;
set
;
}
public
string
FixtureGuid
{
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