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
f997f0e1
Commit
f997f0e1
authored
Jan 26, 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
89a6f874
3f0e0000
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
437 additions
and
81 deletions
+437
-81
datasearch.vue
Html/src/view/qms/analysis/datasearch.vue
+8
-4
collection.vue
Html/src/view/qms/manual/collection.vue
+2
-1
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+200
-50
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+11
-1
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+6
-3
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+20
-3
DictKeyValConst.cs
...ommon/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
+5
-0
AccEnum.cs
...Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
+3
-1
ManualCollectionList.cs
...iddlelayer.Utility/ImportEntities/ManualCollectionList.cs
+2
-3
siger_automation_location.cs
...layer.AccRepository/Entities/siger_automation_location.cs
+20
-0
AutomationFixtureToolsCategoryRepository.cs
.../Repositories/AutomationFixtureToolsCategoryRepository.cs
+3
-3
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+22
-0
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+3
-3
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+3
-3
IAutomationFixtureToolsCategoryRepository.cs
...es/Interface/IAutomationFixtureToolsCategoryRepository.cs
+1
-1
IAutomationFixtureToolsProductRepository.cs
...ies/Interface/IAutomationFixtureToolsProductRepository.cs
+8
-0
IAutomationFixtureToolsRepository.cs
...positories/Interface/IAutomationFixtureToolsRepository.cs
+1
-1
ResponseProductFixtureInfo.cs
...ayer.AccRepository/Response/ResponseProductFixtureInfo.cs
+11
-0
ApiQmsDbContext.cs
...tories/Siger.Middlelayer.QmsRepository/ApiQmsDbContext.cs
+2
-0
siger_project_beat_set.cs
...dlelayer.QmsRepository/Entities/siger_project_beat_set.cs
+96
-0
CheckSnTraceDetailRepository.cs
...msRepository/Repositories/CheckSnTraceDetailRepository.cs
+2
-2
CheckSnTraceInspectionRepository.cs
...pository/Repositories/CheckSnTraceInspectionRepository.cs
+2
-2
DB.script
Server/Infrastructure/Script/DB.script
+6
-0
No files found.
Html/src/view/qms/analysis/datasearch.vue
View file @
f997f0e1
...
@@ -123,6 +123,10 @@
...
@@ -123,6 +123,10 @@
<Input
class=
"searchInput"
type=
"text"
id=
"input1"
v-model=
"editobj.checktype_value"
disabled=
"disabled"
/>
<Input
class=
"searchInput"
type=
"text"
id=
"input1"
v-model=
"editobj.checktype_value"
disabled=
"disabled"
/>
</div>
</div>
<div
class=
"filter"
>
<div
class=
"filter"
>
<label
>
{{$t('950232')}}:
</label>
<Input
class=
"searchInput"
type=
"text"
id=
"input1"
v-model=
"editobj.routename"
disabled=
"disabled"
/>
</div>
<div
class=
"filter"
>
<label
>
{{$t('800008')}}:
</label>
<label
>
{{$t('800008')}}:
</label>
<Input
class=
"searchInput"
type=
"text"
id=
"input1"
v-model=
"editobj.sn"
disabled=
"disabled"
/>
<Input
class=
"searchInput"
type=
"text"
id=
"input1"
v-model=
"editobj.sn"
disabled=
"disabled"
/>
</div>
</div>
...
@@ -330,10 +334,6 @@ export default{
...
@@ -330,10 +334,6 @@ export default{
title
:
this
.
$t
(
'100089'
),
title
:
this
.
$t
(
'100089'
),
key
:
'productcode'
key
:
'productcode'
},
},
// {
// title: this.$t('500006'),
// key: 'routename'
// },
{
{
title
:
this
.
$t
(
'100088'
),
title
:
this
.
$t
(
'100088'
),
key
:
'productname'
key
:
'productname'
...
@@ -347,6 +347,10 @@ export default{
...
@@ -347,6 +347,10 @@ export default{
key
:
'workorder'
key
:
'workorder'
},
},
{
{
title
:
this
.
$t
(
'950232'
),
key
:
'routename'
},
{
title
:
this
.
$t
(
'800008'
),
title
:
this
.
$t
(
'800008'
),
key
:
'sn'
key
:
'sn'
},
},
...
...
Html/src/view/qms/manual/collection.vue
View file @
f997f0e1
...
@@ -678,6 +678,7 @@ export default {
...
@@ -678,6 +678,7 @@ export default {
this
.
stationList
=
res
.
data
.
data
;
this
.
stationList
=
res
.
data
.
data
;
this
.
station
=
this
.
stationList
[
0
];
this
.
station
=
this
.
stationList
[
0
];
this
.
initproduct
(
this
.
station
.
id
);
this
.
initproduct
(
this
.
station
.
id
);
this
.
initSn
(
this
.
station
.
id
);
});
});
}
}
},
},
...
@@ -719,7 +720,7 @@ export default {
...
@@ -719,7 +720,7 @@ export default {
axios
axios
.
request
({
.
request
({
url
:
url
:
"/acc/SectionProperty/GetSn?
productId="
+
productid
+
"&
sectionId="
+
sectionid
,
"/acc/SectionProperty/GetSn?sectionId="
+
sectionid
,
method
:
"get"
,
method
:
"get"
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
f997f0e1
...
@@ -17,6 +17,8 @@ using Siger.Middlelayer.Repository.Repositories.Interface;
...
@@ -17,6 +17,8 @@ using Siger.Middlelayer.Repository.Repositories.Interface;
using
Siger.Middlelayer.Share.Constant
;
using
Siger.Middlelayer.Share.Constant
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
using
Siger.Middlelayer.Repository.Entities
;
using
NPOI.SS.Formula.Functions
;
namespace
Siger.ApiACC.Controllers
namespace
Siger.ApiACC.Controllers
{
{
...
@@ -31,9 +33,12 @@ namespace Siger.ApiACC.Controllers
...
@@ -31,9 +33,12 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationTaskListRepository
_automationTaskList
;
private
readonly
IAutomationTaskListRepository
_automationTaskList
;
private
readonly
ISigerProjectMachineAttributionRepository
_sigerProjectMachineAttribution
;
private
readonly
ISigerProjectMachineAttributionRepository
_sigerProjectMachineAttribution
;
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationLocationRepository
_automationLocation
;
private
readonly
IProductionBeatSetRepository
_productionBeatSet
;
private
readonly
IAutomationFixtureToolsProductRepository
_automationFixtureToolsProduct
;
public
AutomationController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationLineMode
automationLineMode
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerDict
sigerDict
,
IAutomationTaskListRepository
automationTaskList
,
public
AutomationController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationLineMode
automationLineMode
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerDict
sigerDict
,
IAutomationTaskListRepository
automationTaskList
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationFixtureMonitor
automationFixtureMonitor
)
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationLocationRepository
automationLocation
,
IProductionBeatSetRepository
productionBeatSet
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
)
{
{
_unitOfWork
=
unitOfWork
;
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
...
@@ -43,6 +48,9 @@ namespace Siger.ApiACC.Controllers
...
@@ -43,6 +48,9 @@ namespace Siger.ApiACC.Controllers
_automationTaskList
=
automationTaskList
;
_automationTaskList
=
automationTaskList
;
_sigerProjectMachineAttribution
=
sigerProjectMachineAttribution
;
_sigerProjectMachineAttribution
=
sigerProjectMachineAttribution
;
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationLocation
=
automationLocation
;
_productionBeatSet
=
productionBeatSet
;
_automationFixtureToolsProduct
=
automationFixtureToolsProduct
;
}
}
/// <summary>
/// <summary>
...
@@ -76,6 +84,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -76,6 +84,7 @@ namespace Siger.ApiACC.Controllers
exitsObj
.
updatetime
=
DateTime
.
Now
;
exitsObj
.
updatetime
=
DateTime
.
Now
;
}
}
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
{
// 设备空闲,或者完成时触发 自动任务
// 设备空闲,或者完成时触发 自动任务
...
@@ -86,11 +95,17 @@ namespace Siger.ApiACC.Controllers
...
@@ -86,11 +95,17 @@ namespace Siger.ApiACC.Controllers
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(!
tasklist
.
Any
())
if
(!
tasklist
.
Any
())
{
{
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
if
(!
stationDicts
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
machineAttr
.
station
);
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
machineAttr
.
station
);
if
(
section
!=
null
)
if
(
section
!=
null
)
{
{
Logger
.
WriteLineInfo
(
$"MachineStatus 设备状态 触发自动任务检查"
);
Logger
.
WriteLineInfo
(
$"MachineStatus 设备状态 触发自动任务检查"
);
AutoProcess
(
section
.
parentid
);
AutoProcess
(
section
.
parentid
,
stationDicts
);
}
}
}
}
}
}
...
@@ -138,11 +153,19 @@ namespace Siger.ApiACC.Controllers
...
@@ -138,11 +153,19 @@ namespace Siger.ApiACC.Controllers
//TODO
//TODO
//手动-》自动 时
//手动-》自动 时
//task 无任务时候 ,根据设备状态创建任务
//task 无任务时候 ,根据设备状态创建任务
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
if
(!
stationDicts
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(!
tasklist
.
Any
())
if
(!
tasklist
.
Any
())
{
{
Logger
.
WriteLineInfo
(
$"LineMode Mode=1 触发自动任务检查"
);
Logger
.
WriteLineInfo
(
$"LineMode Mode=1 触发自动任务检查"
);
AutoProcess
(
line
);
AutoProcess
(
line
,
stationDicts
);
}
}
}
}
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
...
@@ -193,18 +216,14 @@ namespace Siger.ApiACC.Controllers
...
@@ -193,18 +216,14 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
AutoTaskDone
);
throw
new
BadRequestException
(
AccEnum
.
AutoTaskDone
);
}
}
//2.更新状态
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
taskObj
.
status
=
request
.
status
;
if
(!
stationDicts
.
Any
())
_automationTaskList
.
Update
(
taskObj
);
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
machineStatus
==
null
)
{
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
}
//更新Tasklist
machineStatus
.
status
=
request
.
status
;
PlCfeeback
(
taskObj
,
request
.
status
,
stationDicts
);
_automationMachineStatus
.
Update
(
machineStatus
);
if
(
_unitOfWork
.
Commit
()
<=
0
)
if
(
_unitOfWork
.
Commit
()
<=
0
)
{
{
...
@@ -229,7 +248,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -229,7 +248,7 @@ namespace Siger.ApiACC.Controllers
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
taskObj
.
sectionid
);
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
taskObj
.
sectionid
);
if
(
section
!=
null
)
if
(
section
!=
null
)
{
{
AutoProcess
(
section
.
parentid
);
AutoProcess
(
section
.
parentid
,
stationDicts
);
}
}
break
;
break
;
}
}
...
@@ -243,11 +262,93 @@ namespace Siger.ApiACC.Controllers
...
@@ -243,11 +262,93 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
}
void
PlCfeeback
(
siger_automation_task_list
taskObj
,
int
status
,
IEnumerable
<
SigerTrDict
>
stationDicts
)
{
//2.更新状态
taskObj
.
status
=
status
;
_automationTaskList
.
Update
(
taskObj
);
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
machineStatus
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
machineStatus
.
status
=
status
;
_automationMachineStatus
.
Update
(
machineStatus
);
//PLC 反馈结束. 工装监控 解除设备绑定
if
(
status
==
(
int
)
TaskResultStatus
.
Complated
)
{
var
uploadStation
=
stationDicts
.
Where
(
f
=>
f
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
uploadStations
=
uploadStation
.
Select
(
f
=>
f
.
dval
).
ToList
();
if
(
taskObj
.
action
==
TaskAction
.
Step_SXLW_LK
)
{
// 业务入口: 上料位-》 入库 如果是上料工装 安装完成 ,绑定 储位与装配
if
(
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
taskObj
.
sectionid
.
ToString
())))
{
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
fixturetools
==
taskObj
.
fixtureguid
);
if
(
location
==
null
)
{
location
.
ordernumber
=
taskObj
.
ordercode
;
location
.
sn
=
taskObj
.
sn
;
}
}
}
else
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
||
taskObj
.
action
==
TaskAction
.
Step_LK_JGZX
||
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
{
//出库
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
fixturetools
==
taskObj
.
fixtureguid
);
if
(
location
==
null
)
{
location
.
ordernumber
=
""
;
location
.
sn
=
""
;
}
//更新 CNC 状态
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
monitor
==
null
)
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
ordernumber
=
taskObj
.
ordercode
,
productCode
=
taskObj
.
productcode
,
//productNam
section
=
taskObj
.
sectionid
,
status
=
status
,
sn
=
taskObj
.
sn
,
fixtureguid
=
taskObj
.
fixtureguid
,
//fixturename=,
locationId
=
taskObj
.
locationid
,
createtime
=
DateTime
.
Now
,
projectId
=
PID
,
route
=
0
,
updatetime
=
DateTime
.
Now
,
});
}
else
{
monitor
.
ordernumber
=
taskObj
.
ordercode
;
monitor
.
productCode
=
taskObj
.
productcode
;
monitor
.
status
=
taskObj
.
status
;
monitor
.
sn
=
taskObj
.
sn
;
monitor
.
locationId
=
taskObj
.
locationid
;
monitor
.
updatetime
=
DateTime
.
Now
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
}
}
/// <summary>
/// <summary>
/// 创建自动 Task任务
/// 创建自动 Task任务
/// </summary>
/// </summary>
/// <param name="line"></param>
/// <param name="line"></param>
void
AutoProcess
(
int
line
)
/// <param name="stationDicts"></param>
void
AutoProcess
(
int
line
,
IEnumerable
<
SigerTrDict
>
stationDicts
)
{
{
var
lineMode
=
_automationLineMode
.
Get
(
f
=>
f
.
projectId
==
PID
&&
f
.
section
==
line
);
var
lineMode
=
_automationLineMode
.
Get
(
f
=>
f
.
projectId
==
PID
&&
f
.
section
==
line
);
if
(
lineMode
==
null
)
if
(
lineMode
==
null
)
...
@@ -268,12 +369,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -268,12 +369,7 @@ namespace Siger.ApiACC.Controllers
//2.其他设备上料
//2.其他设备上料
//3.其他设备下料
//3.其他设备下料
*/
*/
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
if
(!
stationDicts
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
return
;
}
var
updownDic
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
updownDic
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
uploadStations
=
updownDic
.
Select
(
f
=>
f
.
dval
).
ToList
();
var
uploadStations
=
updownDic
.
Select
(
f
=>
f
.
dval
).
ToList
();
...
@@ -301,8 +397,20 @@ namespace Siger.ApiACC.Controllers
...
@@ -301,8 +397,20 @@ namespace Siger.ApiACC.Controllers
{
{
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗剂Task"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗机Task"
);
CreateTask
(
cleanMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
,
uploadStations
);
var
uploadPostion
=
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
cleanMachine
.
section
.
ToString
()));
if
(
uploadPostion
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 上料料工站 无需自动创建任务 "
);
return
;
}
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
cleanMachine
.
section
);
if
(
monitor
==
null
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 找不到CNC监控信息"
);
return
;
}
CreateTask
(
cleanMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
,
monitor
.
fixtureguid
,
monitor
.
ordernumber
,
monitor
.
sn
,
monitor
.
productCode
,
monitor
.
locationId
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
}
}
...
@@ -313,7 +421,19 @@ namespace Siger.ApiACC.Controllers
...
@@ -313,7 +421,19 @@ namespace Siger.ApiACC.Controllers
if
(
freeMachine
!=
null
)
if
(
freeMachine
!=
null
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备上料Task"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备上料Task"
);
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
uploadStations
);
var
uploadPostion
=
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
freeMachine
.
section
.
ToString
()));
if
(
uploadPostion
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 上料料工站 无需自动创建任务 "
);
return
;
}
var
location
=
SelectLocation
(
freeMachine
.
machineid
);
if
(
location
==
null
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 找不到储位信息"
);
return
;
}
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
location
.
guid
,
location
.
ordernumber
,
location
.
sn
,
location
.
productcode
,
location
.
locationid
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
//优先级3:其他设备下料 (加工中心 ->立库)
//优先级3:其他设备下料 (加工中心 ->立库)
...
@@ -323,7 +443,19 @@ namespace Siger.ApiACC.Controllers
...
@@ -323,7 +443,19 @@ namespace Siger.ApiACC.Controllers
if
(
fullMachine
!=
null
&&
cleanMachine
.
status
==(
int
)
Automation
.
MachineStatus
.
Waiting
)
if
(
fullMachine
!=
null
&&
cleanMachine
.
status
==(
int
)
Automation
.
MachineStatus
.
Waiting
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备下料Task "
);
Logger
.
WriteLineInfo
(
$"AutoProcess 普通空闲,创建普通设备下料Task "
);
CreateTask
(
fullMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_JGZX_QXJ
,
uploadStations
);
var
uploadPostion
=
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
cleanMachine
.
section
.
ToString
()));
if
(
uploadPostion
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 上料料工站 无需自动创建任务 "
);
return
;
}
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
cleanMachine
.
section
);
if
(
monitor
==
null
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 找不到CNC监控信息"
);
return
;
}
CreateTask
(
fullMachine
,
TaskActionType
.
Unload
,
TaskAction
.
Step_JGZX_QXJ
,
monitor
.
fixtureguid
,
monitor
.
ordernumber
,
monitor
.
sn
,
monitor
.
productCode
,
monitor
.
locationId
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
...
@@ -338,27 +470,13 @@ namespace Siger.ApiACC.Controllers
...
@@ -338,27 +470,13 @@ namespace Siger.ApiACC.Controllers
/// <param name="actionType"></param>
/// <param name="actionType"></param>
/// <param name="taskAction"></param>
/// <param name="taskAction"></param>
/// <param name="uploadStations"></param>
/// <param name="uploadStations"></param>
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
,
List
<
string
>
uploadStations
)
/// <param name="guid">工装GUID</param>
{
/// <param name="orderno">订单</param>
var
uploadPostion
=
uploadStations
.
Exists
(
f
=>
f
.
Contains
(
machineStatus
.
section
.
ToString
()));
/// <param name="sn">工件</param>
if
(
uploadPostion
)
/// <param name="productCode">产品CODE</param>
/// <param name="locationid">储位ID</param>
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
,
string
guid
,
string
orderno
,
string
sn
,
string
productCode
,
int
locationid
)
{
{
Logger
.
WriteLineInfo
(
$"CreateTask 上料料工站 无需自动创建任务 "
);
return
;
}
//j检查工装监控状态
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
machineStatus
.
section
);
if
(
monitor
==
null
)
{
Logger
.
WriteLineInfo
(
$"CreateTask 工装监控状态无数据,请确认业务链正确 "
);
return
;
}
if
(
monitor
.
section
==
0
)
{
Logger
.
WriteLineInfo
(
$"CreateTask 工装监控状态无当前工站信息,请确认业务链正确 "
);
return
;
}
_automationTaskList
.
Insert
(
new
siger_automation_task_list
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
{
...
@@ -374,11 +492,11 @@ namespace Siger.ApiACC.Controllers
...
@@ -374,11 +492,11 @@ namespace Siger.ApiACC.Controllers
send
=
0
,
send
=
0
,
operater
=
0
,
operater
=
0
,
status
=
1
,
status
=
1
,
fixtureguid
=
monitor
.
fixture
guid
,
fixtureguid
=
guid
,
productcode
=
monitor
.
productCode
,
productcode
=
productCode
,
locationid
=
monitor
.
locationI
d
,
locationid
=
locationi
d
,
ordercode
=
monitor
.
ordernumber
,
ordercode
=
orderno
,
sn
=
monitor
.
sn
,
sn
=
sn
,
remark
=
"自动任务"
remark
=
"自动任务"
});
});
...
@@ -389,6 +507,38 @@ namespace Siger.ApiACC.Controllers
...
@@ -389,6 +507,38 @@ namespace Siger.ApiACC.Controllers
else
else
Logger
.
WriteLineInfo
(
$"CreateTask 工站 失败"
);
Logger
.
WriteLineInfo
(
$"CreateTask 工站 失败"
);
}
}
/// <summary>
/// 自动匹配储位 储位 ->CNC
/// </summary>
siger_automation_location
SelectLocation
(
int
machine
)
{
// 当前空闲设备能加工的产品
var
beats
=
_productionBeatSet
.
GetList
(
f
=>
f
.
projectID
==
PID
&&
f
.
machineID
==
machine
);
var
productIds
=
beats
.
Select
(
f
=>
f
.
product_name
.
ToInt
()).
ToList
();
// 取产品交期最近的订单
var
planOrder
=
_automationFixtureToolsProduct
.
GetDeliveryOrder
(
productIds
,
PID
);
if
(!
planOrder
.
Any
())
{
Logger
.
WriteLineInfo
(
$"SelectLocation 未找到最近订单号信息"
);
return
null
;
}
var
order
=
planOrder
.
FirstOrDefault
();
var
beatset
=
beats
.
Where
(
f
=>
f
.
product_name
==
order
.
productId
.
ToString
());
//var routeIds = beatset.Select(s => s.id).ToList();
var
location
=
_automationLocation
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
ordernumber
==
order
.
ordernumber
&&
productIds
.
Contains
(
f
.
productid
));
if
(
location
==
null
)
{
Logger
.
WriteLineInfo
(
$"SelectLocation 未找到最近交期订单号
{
order
.
ordernumber
}
对应产品
{
order
.
productName
}
的储位信息"
);
return
null
;
}
return
location
.
FirstOrDefault
();
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
f997f0e1
...
@@ -30,10 +30,11 @@ namespace Siger.ApiACC.Controllers
...
@@ -30,10 +30,11 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationLocationRepository
_autoLocationRepository
;
private
readonly
IAutomationLocationRepository
_autoLocationRepository
;
private
readonly
IAutomationFixtureMonitor
_fixtureMonitor
;
private
readonly
IAutomationFixtureMonitor
_fixtureMonitor
;
private
readonly
IProductRouteRepository
_routeRepository
;
private
readonly
IProductRouteRepository
_routeRepository
;
private
readonly
IAutomationFixtureToolsProductRepository
_automationFixtureToolsProduct
;
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
,
IAutomationFixtureMonitor
fixtureMonitor
,
IProductRouteRepository
routeRepository
)
IAutomationFixtureMonitor
fixtureMonitor
,
IProductRouteRepository
routeRepository
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
)
{
{
_unitOfWork
=
unitOfWork
;
_unitOfWork
=
unitOfWork
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
...
@@ -41,6 +42,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -41,6 +42,7 @@ namespace Siger.ApiACC.Controllers
_autoLocationRepository
=
autoLocationRepository
;
_autoLocationRepository
=
autoLocationRepository
;
_fixtureMonitor
=
fixtureMonitor
;
_fixtureMonitor
=
fixtureMonitor
;
_routeRepository
=
routeRepository
;
_routeRepository
=
routeRepository
;
_automationFixtureToolsProduct
=
automationFixtureToolsProduct
;
}
}
[
HttpGet
]
[
HttpGet
]
...
@@ -192,6 +194,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -192,6 +194,8 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
}
}
var
fixturetoolProduct
=
_automationFixtureToolsProduct
.
Get
(
f
=>
f
.
fixturetools
==
fixturetool
.
guid
);
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
if
(
location
==
null
)
if
(
location
==
null
)
{
{
...
@@ -209,6 +213,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -209,6 +213,8 @@ namespace Siger.ApiACC.Controllers
guid
=
Guid
.
NewGuid
().
ToString
(),
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
location
.
locationid
,
locationid
=
location
.
locationid
,
fixturetools
=
fixturetool
.
guid
,
fixturetools
=
fixturetool
.
guid
,
productid
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productid
:
0
,
productcode
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productcode
:
""
,
attachment
=
req
.
fileurl
,
attachment
=
req
.
fileurl
,
filename
=
req
.
filename
,
filename
=
req
.
filename
,
remark
=
req
.
remark
,
remark
=
req
.
remark
,
...
@@ -244,6 +250,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -244,6 +250,7 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
}
}
var
fixturetoolProduct
=
_automationFixtureToolsProduct
.
Get
(
f
=>
f
.
fixturetools
==
fixturetool
.
guid
);
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
if
(
location
==
null
)
if
(
location
==
null
)
{
{
...
@@ -263,6 +270,9 @@ namespace Siger.ApiACC.Controllers
...
@@ -263,6 +270,9 @@ namespace Siger.ApiACC.Controllers
entity
.
remark
=
req
.
remark
;
entity
.
remark
=
req
.
remark
;
entity
.
updatetime
=
DateTime
.
Now
;
entity
.
updatetime
=
DateTime
.
Now
;
entity
.
updator
=
UserId
;
entity
.
updator
=
UserId
;
entity
.
productid
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productid
:
0
;
entity
.
productcode
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productcode
:
""
;
_autoLocationRepository
.
Update
(
entity
);
_autoLocationRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
f997f0e1
...
@@ -35,9 +35,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -35,9 +35,10 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationFixtureMonitor
_automationFixtureMonitor
;
private
readonly
IAutomationFixtureToolsProductRepository
_automationFixtureToolsProduct
;
private
readonly
IAutomationFixtureToolsProductRepository
_automationFixtureToolsProduct
;
private
readonly
IAutomationFixtureToolsRepository
_automationFixtureTools
;
private
readonly
IAutomationFixtureToolsRepository
_automationFixtureTools
;
private
readonly
IAutomationLocationRepository
_automationLocation
;
public
AutomationOperateController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
ISigerDict
sigerDict
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationTaskListRepository
automationTaskList
,
public
AutomationOperateController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
ISigerDict
sigerDict
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationTaskListRepository
automationTaskList
,
IProductPlanDetails
planDetails
,
IProductPlanRepository
productPlan
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
,
IAutomationFixtureToolsRepository
automationFixtureTools
)
IProductPlanDetails
planDetails
,
IProductPlanRepository
productPlan
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
,
IAutomationFixtureToolsRepository
automationFixtureTools
,
IAutomationLocationRepository
automationLocation
)
{
{
_unitOfWork
=
unitOfWork
;
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
...
@@ -50,6 +51,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -50,6 +51,7 @@ namespace Siger.ApiACC.Controllers
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationFixtureMonitor
=
automationFixtureMonitor
;
_automationFixtureToolsProduct
=
automationFixtureToolsProduct
;
_automationFixtureToolsProduct
=
automationFixtureToolsProduct
;
_automationFixtureTools
=
automationFixtureTools
;
_automationFixtureTools
=
automationFixtureTools
;
_automationLocation
=
automationLocation
;
}
}
/// <summary>
/// <summary>
...
@@ -173,7 +175,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -173,7 +175,7 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
result
);
return
new
ObjectResult
(
result
);
}
}
/// <summary>
/// <summary>
/// 准备上料 -生成指令 load
/// 准备上料 -生成指令 load
(立库->上料位)
/// </summary>
/// </summary>
/// <param name="loading"></param>
/// <param name="loading"></param>
/// <returns></returns>
/// <returns></returns>
...
@@ -348,6 +350,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -348,6 +350,8 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
}
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
{
{
...
@@ -376,7 +380,6 @@ namespace Siger.ApiACC.Controllers
...
@@ -376,7 +380,6 @@ namespace Siger.ApiACC.Controllers
});
});
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
{
Logger
.
WriteLineError
(
$"手动任务创建成功-
{
Siger
.
Middlelayer
.
Common
.
Helpers
.
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
Logger
.
WriteLineError
(
$"手动任务创建成功-
{
Siger
.
Middlelayer
.
Common
.
Helpers
.
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
f997f0e1
...
@@ -40,9 +40,17 @@ namespace Siger.ApiACC.Controllers
...
@@ -40,9 +40,17 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
,
string
toexcel
)
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
,
string
toexcel
)
{
{
var
data
=
_toolsRepository
.
GetPagedList
(
category
.
ToInt
(),
code
,
name
,
string
.
IsNullOrEmpty
(
state
)
?
-
1
:
state
.
ToInt
(),
ProjectId
,
page
,
pagesize
,
toexcel
);
var
list
=
new
List
<
ResponseFixtureTools
>();
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
categoryIds
=
new
List
<
int
>();
if
(
category
.
ToInt
()
>
0
)
{
var
cate
=
categorys
.
FirstOrDefault
(
q
=>
q
.
id
==
category
.
ToInt
());
var
sonCates
=
GetSonCategoryList
(
cate
.
guid
,
categorys
);
categoryIds
=
sonCates
.
Select
(
q
=>
q
.
id
).
ToList
();
categoryIds
.
Add
(
category
.
ToInt
());
}
var
data
=
_toolsRepository
.
GetPagedList
(
categoryIds
,
code
,
name
,
string
.
IsNullOrEmpty
(
state
)
?
-
1
:
state
.
ToInt
(),
ProjectId
,
page
,
pagesize
,
toexcel
);
var
list
=
new
List
<
ResponseFixtureTools
>();
foreach
(
var
item
in
data
.
Data
)
foreach
(
var
item
in
data
.
Data
)
{
{
var
cates
=
GetParentCategoryList
(
item
.
cate_guid
,
categorys
);
var
cates
=
GetParentCategoryList
(
item
.
cate_guid
,
categorys
);
...
@@ -258,7 +266,16 @@ namespace Siger.ApiACC.Controllers
...
@@ -258,7 +266,16 @@ namespace Siger.ApiACC.Controllers
[
HttpGet
]
[
HttpGet
]
public
IActionResult
GetCategoryPageList
(
string
id
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
public
IActionResult
GetCategoryPageList
(
string
id
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
{
{
var
data
=
_toolsCategoryRepository
.
GetPagedList
(
id
.
ToInt
(),
ProjectId
,
page
,
pagesize
,
toexcel
);
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
categoryIds
=
new
List
<
int
>();
if
(
id
.
ToInt
()
>
0
)
{
var
cate
=
categorys
.
FirstOrDefault
(
q
=>
q
.
id
==
id
.
ToInt
());
var
sonCates
=
GetSonCategoryList
(
cate
.
guid
,
categorys
);
categoryIds
=
sonCates
.
Select
(
q
=>
q
.
id
).
ToList
();
categoryIds
.
Add
(
id
.
ToInt
());
}
var
data
=
_toolsCategoryRepository
.
GetPagedList
(
categoryIds
,
ProjectId
,
page
,
pagesize
,
toexcel
);
if
(
toexcel
.
ToInt
()
==
1
)
if
(
toexcel
.
ToInt
()
==
1
)
{
{
return
ExportCategoryExcel
(
data
.
Data
);
return
ExportCategoryExcel
(
data
.
Data
);
...
...
Server/Common/Siger.Middlelayer.Share/Constant/DictKeyValConst.cs
View file @
f997f0e1
...
@@ -38,5 +38,10 @@ namespace Siger.Middlelayer.Share.Constant
...
@@ -38,5 +38,10 @@ namespace Siger.Middlelayer.Share.Constant
/// </summary>
/// </summary>
public
const
string
UploadloadStation
=
"LoadStation"
;
public
const
string
UploadloadStation
=
"LoadStation"
;
/// <summary>
/// 立库
/// </summary>
public
const
string
WarehouseStation
=
"WarehouseStation"
;
}
}
}
}
Server/Common/Siger.Middlelayer.Share/Enum/ModuleEnum/AccEnum.cs
View file @
f997f0e1
...
@@ -334,7 +334,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
...
@@ -334,7 +334,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[
Description
(
"设备已经生产完成"
)]
[
Description
(
"设备已经生产完成"
)]
MachineProCompalate
,
MachineProCompalate
,
[
Description
(
"该设备当前无工装状态"
)]
[
Description
(
"该设备当前无工装状态"
)]
MonitorNotfound
MonitorNotfound
,
[
Description
(
"未配置字典信息"
)]
AutomationDictNotfound
}
}
public
enum
SeriNumCfg
public
enum
SeriNumCfg
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/ManualCollectionList.cs
View file @
f997f0e1
...
@@ -14,14 +14,13 @@ namespace Siger.Middlelayer.Utility.ImportEntities
...
@@ -14,14 +14,13 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[
ExcelColumn
(
"产品名称"
)]
[
ExcelColumn
(
"产品名称"
)]
public
string
ProductName
{
get
;
set
;
}
public
string
ProductName
{
get
;
set
;
}
[
ExcelColumn
(
"工序"
)]
public
string
RouteName
{
get
;
set
;
}
[
ExcelColumn
(
"位置"
)]
[
ExcelColumn
(
"位置"
)]
public
string
Section
{
get
;
set
;
}
public
string
Section
{
get
;
set
;
}
[
ExcelColumn
(
"工单"
)]
[
ExcelColumn
(
"工单"
)]
public
string
WorkOrder
{
get
;
set
;
}
public
string
WorkOrder
{
get
;
set
;
}
[
ExcelColumn
(
"工艺"
)]
public
string
RouteName
{
get
;
set
;
}
[
ExcelColumn
(
"二维码"
)]
[
ExcelColumn
(
"二维码"
)]
public
string
SN
{
get
;
set
;
}
public
string
SN
{
get
;
set
;
}
[
ExcelColumn
(
"偏差放行数量"
)]
[
ExcelColumn
(
"偏差放行数量"
)]
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_location.cs
View file @
f997f0e1
...
@@ -18,6 +18,26 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -18,6 +18,26 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 工装GUID
/// 工装GUID
/// </summary>
/// </summary>
public
string
fixturetools
{
get
;
set
;
}
public
string
fixturetools
{
get
;
set
;
}
public
int
productid
{
get
;
set
;
}
public
string
productcode
{
get
;
set
;
}
/// <summary>
/// 工件对应的工单号
/// </summary>
public
string
ordernumber
{
get
;
set
;
}
/// <summary>
/// 工装工件
/// </summary>
public
string
sn
{
get
;
set
;
}
/// <summary>
/// 每加工CNC 设备 经过的工序: 标准节拍表
/// </summary>
public
int
routeid
{
get
;
set
;
}
/// <summary>
/// 每加工CNC 设备 经过的工序: 标准节拍表
/// </summary>
public
string
route
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 附件
/// 附件
/// </summary>
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsCategoryRepository.cs
View file @
f997f0e1
...
@@ -23,7 +23,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -23,7 +23,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
_context
=
context
;
_context
=
context
;
}
}
public
IPagedCollectionResult
<
ResponseFixtureToolsCategory
>
GetPagedList
(
int
id
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
public
IPagedCollectionResult
<
ResponseFixtureToolsCategory
>
GetPagedList
(
List
<
int
>
id
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
{
{
Expression
<
Func
<
ResponseFixtureToolsCategory
,
bool
>>
FunNum
=
f
=>
true
;
Expression
<
Func
<
ResponseFixtureToolsCategory
,
bool
>>
FunNum
=
f
=>
true
;
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools_category
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools_category
...
@@ -41,9 +41,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -41,9 +41,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
createtime
=
q
.
createtime
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
createtime
=
q
.
createtime
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
time
=
q
.
createtime
time
=
q
.
createtime
};
};
if
(
id
>
0
)
if
(
id
.
Any
()
)
{
{
FunNum
=
q
=>
q
.
id
==
id
;
FunNum
=
q
=>
id
.
Contains
(
q
.
id
)
;
}
}
if
(
toexcel
.
ToInt
()
==
1
)
if
(
toexcel
.
ToInt
()
==
1
)
{
{
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
f997f0e1
...
@@ -97,6 +97,28 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -97,6 +97,28 @@ namespace Siger.Middlelayer.AccRepository.Repositories
}
}
}
}
/// <summary>
/// 获取 交期最早的订单
/// </summary>
/// <param name="productIds"></param>
/// <param name="projectId"></param>
/// <returns></returns>
public
IEnumerable
<
ResponseAutomationPlanOrder
>
GetDeliveryOrder
(
List
<
int
>
productIds
,
int
projectId
)
{
var
query
=
from
d
in
_context
.
siger_project_product_plan_detail
join
p
in
_context
.
siger_project_product_plan
on
d
.
PlanId
equals
p
.
id
where
d
.
projectId
==
projectId
&&
productIds
.
Contains
(
p
.
product_id
)
&&
d
.
status
!=
(
int
)
RowState
.
Invalid
&&
p
.
status
!=
(
int
)
RowState
.
Invalid
select
new
ResponseAutomationPlanOrder
{
productId
=
p
.
product_id
,
ordernumber
=
d
.
OrderNumber
,
productCode
=
p
.
product_code
,
productName
=
p
.
product_name
,
delvery
=
p
.
delivery_time
,
};
return
query
.
OrderBy
(
f
=>
f
.
delvery
);
}
public
ResponsePlanlFixtureInfo
GetPlanFixtureInfo
(
int
projectId
,
string
ordernumber
)
public
ResponsePlanlFixtureInfo
GetPlanFixtureInfo
(
int
projectId
,
string
ordernumber
)
{
{
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
f997f0e1
...
@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
_context
=
context
;
_context
=
context
;
}
}
public
IPagedCollectionResult
<
ResponseFixtureTools
>
GetPagedList
(
int
category
,
string
code
,
string
name
,
int
state
,
public
IPagedCollectionResult
<
ResponseFixtureTools
>
GetPagedList
(
List
<
int
>
category
,
string
code
,
string
name
,
int
state
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
)
{
{
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools
...
@@ -53,9 +53,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -53,9 +53,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
};
};
Expression
<
Func
<
ResponseFixtureTools
,
bool
>>
categoryExpression
=
f
=>
true
;
Expression
<
Func
<
ResponseFixtureTools
,
bool
>>
categoryExpression
=
f
=>
true
;
if
(
category
>
0
)
if
(
category
.
Any
()
)
{
{
categoryExpression
=
q
=>
q
.
categoryid
==
category
;
categoryExpression
=
q
=>
category
.
Contains
(
q
.
categoryid
)
;
}
}
Expression
<
Func
<
ResponseFixtureTools
,
bool
>>
codeExpression
=
f
=>
true
;
Expression
<
Func
<
ResponseFixtureTools
,
bool
>>
codeExpression
=
f
=>
true
;
if
(!
string
.
IsNullOrEmpty
(
code
))
if
(!
string
.
IsNullOrEmpty
(
code
))
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
f997f0e1
...
@@ -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
m
in
_context
.
siger_automation_fixture_tools_moniter
on
q
.
fixturetools
equals
m
.
fixtureguid
into
mm
join
m
in
_context
.
siger_automation_fixture_tools_moniter
on
q
.
fixturetools
equals
m
.
fixtureguid
into
mm
from
m
in
mm
.
DefaultIfEmpty
()
from
m
in
mm
.
DefaultIfEmpty
()
join
r
in
_context
.
siger_project_
product_route
on
m
.
route
equals
r
.
id
into
rr
join
r
in
_context
.
siger_project_
beat_set
on
m
.
route
equals
r
.
id
into
rr
from
r
in
rr
.
DefaultIfEmpty
()
from
r
in
rr
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocation
select
new
ResponseAutomationLocation
...
@@ -58,8 +58,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -58,8 +58,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
status
=
q
.
status
,
status
=
q
.
status
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
sn
=
m
.
sn
??
""
,
sn
=
m
.
sn
??
""
,
route
=
r
.
name
??
""
,
route
=
r
.
route_
name
??
""
,
routenumber
=
r
==
null
?
""
:
r
.
serialN
umber
.
ToString
(),
routenumber
=
r
==
null
?
""
:
r
.
route_n
umber
.
ToString
(),
cate_guid
=
c
.
guid
??
""
,
cate_guid
=
c
.
guid
??
""
,
categoryId
=
c
==
null
?
0
:
c
.
id
categoryId
=
c
==
null
?
0
:
c
.
id
};
};
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationFixtureToolsCategoryRepository.cs
View file @
f997f0e1
...
@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
{
public
interface
IAutomationFixtureToolsCategoryRepository
:
IAccRepositoryBase
<
siger_automation_fixture_tools_category
>
public
interface
IAutomationFixtureToolsCategoryRepository
:
IAccRepositoryBase
<
siger_automation_fixture_tools_category
>
{
{
IPagedCollectionResult
<
ResponseFixtureToolsCategory
>
GetPagedList
(
int
id
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
);
IPagedCollectionResult
<
ResponseFixtureToolsCategory
>
GetPagedList
(
List
<
int
>
id
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
);
CommonImportResult
ImportData
(
IEnumerable
<
FixtureToolsCategoryTemplate
>
list
,
int
projectid
);
CommonImportResult
ImportData
(
IEnumerable
<
FixtureToolsCategoryTemplate
>
list
,
int
projectid
);
}
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationFixtureToolsProductRepository.cs
View file @
f997f0e1
...
@@ -23,5 +23,13 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -23,5 +23,13 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
CommonImportResult
ImportData
(
IEnumerable
<
FixtureToolsProductTemplate
>
list
,
int
projectid
,
int
userid
);
CommonImportResult
ImportData
(
IEnumerable
<
FixtureToolsProductTemplate
>
list
,
int
projectid
,
int
userid
);
/// <summary>
/// 获取交期最近的订单
/// </summary>
/// <param name="productIds"></param>
/// <param name="projectId"></param>
/// <returns></returns>
IEnumerable
<
ResponseAutomationPlanOrder
>
GetDeliveryOrder
(
List
<
int
>
productIds
,
int
projectId
);
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationFixtureToolsRepository.cs
View file @
f997f0e1
...
@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
{
public
interface
IAutomationFixtureToolsRepository
:
IAccRepositoryBase
<
siger_automation_fixture_tools
>
public
interface
IAutomationFixtureToolsRepository
:
IAccRepositoryBase
<
siger_automation_fixture_tools
>
{
{
IPagedCollectionResult
<
ResponseFixtureTools
>
GetPagedList
(
int
category
,
string
code
,
string
name
,
int
state
,
IPagedCollectionResult
<
ResponseFixtureTools
>
GetPagedList
(
List
<
int
>
category
,
string
code
,
string
name
,
int
state
,
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
);
int
projectid
,
int
page
,
int
pagesize
,
string
toexcel
=
""
);
IEnumerable
<
ResponseFixtureTools
>
GetDataList
(
int
categoryid
,
int
projectid
);
IEnumerable
<
ResponseFixtureTools
>
GetDataList
(
int
categoryid
,
int
projectid
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseProductFixtureInfo.cs
View file @
f997f0e1
...
@@ -40,4 +40,15 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -40,4 +40,15 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
Location
{
get
;
set
;
}
public
int
Location
{
get
;
set
;
}
public
string
Sn
{
get
;
set
;
}
public
string
Sn
{
get
;
set
;
}
}
}
public
class
ResponseAutomationPlanOrder
{
public
string
ordernumber
{
get
;
set
;
}
public
int
productId
{
get
;
set
;
}
public
string
productCode
{
get
;
set
;
}
public
string
productName
{
get
;
set
;
}
public
int
delvery
{
get
;
set
;
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.QmsRepository/ApiQmsDbContext.cs
View file @
f997f0e1
...
@@ -157,5 +157,7 @@ namespace Siger.Middlelayer.QmsRepository
...
@@ -157,5 +157,7 @@ namespace Siger.Middlelayer.QmsRepository
public
DbSet
<
siger_tr_sn_trace_detail
>
siger_tr_sn_trace_detail
{
get
;
set
;
}
public
DbSet
<
siger_tr_sn_trace_detail
>
siger_tr_sn_trace_detail
{
get
;
set
;
}
public
DbSet
<
siger_project_beat_set
>
siger_project_beat_set
{
get
;
set
;
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.QmsRepository/Entities/siger_project_beat_set.cs
0 → 100644
View file @
f997f0e1
using
System
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Siger.Middlelayer.QmsRepository.Entities
{
/// <summary>
/// siger_project_beat_set Entity Model
/// </summary>
public
class
siger_project_beat_set
:
QmsEntityBase
{
/// <summary>
/// 产线id
/// </summary>
public
int
section_id
{
get
;
set
;
}
/// <summary>
/// 设备id
/// </summary>
public
int
machineID
{
get
;
set
;
}
/// <summary>
/// 加工程序号
/// </summary>
public
string
process_number
{
get
;
set
;
}
/// <summary>
/// 产品名称 编号
/// </summary>
public
string
product_name
{
get
;
set
;
}
/// <summary>
/// 产品图纸号
/// </summary>
public
string
drawing_number
{
get
;
set
;
}
/// <summary>
/// 标准节拍(单位/ 秒 S )
/// </summary>
public
int
standard_besat
{
get
;
set
;
}
/// <summary>
/// 日标准产量(单位/pcs个)
/// </summary>
public
int
daily_standard_output
{
get
;
set
;
}
/// <summary>
/// 添加时间
/// </summary>
public
DateTime
add_time
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
?
edit_time
{
get
;
set
;
}
/// <summary>
/// 产品名称
/// </summary>
public
string
product_name_text
{
get
;
set
;
}
/// <summary>
/// 换型时间
/// </summary>
public
int
changemodeltime
{
get
;
set
;
}
/// <summary>
/// 工序顺序
/// </summary>
public
string
route_number
{
get
;
set
;
}
=
""
;
/// <summary>
/// 工序名称
/// </summary>
public
string
route_name
{
get
;
set
;
}
/// <summary>
/// 上下料时间
/// </summary>
public
double
updown_besat
{
get
;
set
;
}
/// <summary>
/// 产量比率
/// </summary>
public
int
yieldrate
{
get
;
set
;
}
/// <summary>
/// 有效开始时间
/// </summary>
public
DateTime
start_time
{
get
;
set
;
}
/// <summary>
/// 有效结束时间
/// </summary>
public
DateTime
end_time
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.QmsRepository/Repositories/CheckSnTraceDetailRepository.cs
View file @
f997f0e1
...
@@ -38,7 +38,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -38,7 +38,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
from
m
in
mm
.
DefaultIfEmpty
()
from
m
in
mm
.
DefaultIfEmpty
()
join
s
in
_context
.
siger_project_level_section
on
q
.
sectionid
equals
s
.
id
into
ss
join
s
in
_context
.
siger_project_level_section
on
q
.
sectionid
equals
s
.
id
into
ss
from
s
in
ss
.
DefaultIfEmpty
()
from
s
in
ss
.
DefaultIfEmpty
()
join
r
in
_context
.
siger_project_
product_route
on
q
.
routeid
equals
r
.
id
into
rr
join
r
in
_context
.
siger_project_
beat_set
on
q
.
routeid
equals
r
.
id
into
rr
from
r
in
rr
.
DefaultIfEmpty
()
from
r
in
rr
.
DefaultIfEmpty
()
join
u1
in
_context
.
siger_project_user
on
q
.
send_mid
equals
u1
.
mid
into
uu1
join
u1
in
_context
.
siger_project_user
on
q
.
send_mid
equals
u1
.
mid
into
uu1
from
u1
in
uu1
.
DefaultIfEmpty
()
from
u1
in
uu1
.
DefaultIfEmpty
()
...
@@ -60,7 +60,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -60,7 +60,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
check_time
=
(
q
.
check_time
.
HasValue
&&
q
.
check_time
!=
DateTime
.
Now
)
?
check_time
=
(
q
.
check_time
.
HasValue
&&
q
.
check_time
!=
DateTime
.
Now
)
?
q
.
check_time
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
q
.
check_time
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
routeid
=
q
.
routeid
,
routeid
=
q
.
routeid
,
routename
=
r
.
name
??
""
,
routename
=
r
.
route_
name
??
""
,
materialid
=
q
.
materialid
,
materialid
=
q
.
materialid
,
materialname
=
m
.
name
??
""
,
materialname
=
m
.
name
??
""
,
materialpn
=
m
.
pn
??
""
,
materialpn
=
m
.
pn
??
""
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.QmsRepository/Repositories/CheckSnTraceInspectionRepository.cs
View file @
f997f0e1
...
@@ -34,7 +34,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -34,7 +34,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
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
m
in
_context
.
siger_tr_materials
on
q
.
materialid
equals
m
.
id
into
mm
join
m
in
_context
.
siger_tr_materials
on
q
.
materialid
equals
m
.
id
into
mm
from
m
in
mm
.
DefaultIfEmpty
()
from
m
in
mm
.
DefaultIfEmpty
()
join
r
in
_context
.
siger_project_
product_route
on
q
.
routeid
equals
r
.
id
into
rr
join
r
in
_context
.
siger_project_
beat_set
on
q
.
routeid
equals
r
.
id
into
rr
from
r
in
rr
.
DefaultIfEmpty
()
from
r
in
rr
.
DefaultIfEmpty
()
join
u1
in
_context
.
siger_user
on
q
.
send_mid
equals
u1
.
id
into
uu1
join
u1
in
_context
.
siger_user
on
q
.
send_mid
equals
u1
.
id
into
uu1
from
u1
in
uu1
.
DefaultIfEmpty
()
from
u1
in
uu1
.
DefaultIfEmpty
()
...
@@ -58,7 +58,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
...
@@ -58,7 +58,7 @@ namespace Siger.Middlelayer.QmsRepository.Repositories
sectionid
=
q
.
sectionid
,
sectionid
=
q
.
sectionid
,
sectionname
=
s
.
title
??
""
,
sectionname
=
s
.
title
??
""
,
routeid
=
q
.
routeid
,
routeid
=
q
.
routeid
,
routename
=
r
.
name
??
""
,
routename
=
r
.
route_
name
??
""
,
testroom
=
q
.
testroom
,
testroom
=
q
.
testroom
,
sn
=
q
.
sn
,
sn
=
q
.
sn
,
checktype
=
q
.
check_type
,
checktype
=
q
.
check_type
,
...
...
Server/Infrastructure/Script/DB.script
View file @
f997f0e1
...
@@ -269,6 +269,12 @@ CREATE TABLE IF NOT EXISTS `siger_automation_location` (
...
@@ -269,6 +269,12 @@ CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id` int(11) NOT NULL AUTO_INCREMENT,
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE',
`ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件对应工单号',
`sn` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件',
`routeid` int(11) NULL DEFAULT 0,
`route` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工序',
`attachment` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
`attachment` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
`filename` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件名称',
`filename` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件名称',
`remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
...
...
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