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
99b73ad8
Commit
99b73ad8
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
a6d6c689
e6c18caf
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
211 additions
and
46 deletions
+211
-46
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+3
-0
AccRegistry.cs
Server/Apis/Siger.ApiACC/Tasks/AccRegistry.cs
+3
-1
AutoMES.cs
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
+95
-5
DBhelper.cs
Server/Apis/Siger.ApiACC/Tasks/DBhelper.cs
+38
-12
CncRegistry.cs
Server/Apis/Siger.ApiCNC/Tasks/CncRegistry.cs
+1
-1
CommonConst.cs
...er/Common/Siger.Middlelayer.Share/Constant/CommonConst.cs
+2
-0
siger_automation_fixture_tools_monitor.cs
...sitory/Entities/siger_automation_fixture_tools_monitor.cs
+4
-0
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+1
-1
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+2
-1
RequestPLC.cs
...ies/Siger.Middlelayer.AccRepository/Request/RequestPLC.cs
+44
-0
ResponseProductFixtureInfo.cs
...ayer.AccRepository/Response/ResponseProductFixtureInfo.cs
+3
-2
DB.script
Server/Infrastructure/Script/DB.script
+15
-23
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
99b73ad8
...
@@ -141,6 +141,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -141,6 +141,8 @@ namespace Siger.ApiACC.Controllers
var
result
=
new
ResponsePlanlFixtureInfo
var
result
=
new
ResponsePlanlFixtureInfo
{
{
OrderNumber
=
monitor
.
ordernumber
,
OrderNumber
=
monitor
.
ordernumber
,
FixtureGuid
=
monitor
.
fixtureguid
,
FixtureName
=
monitor
.
fixturename
,
ProductCode
=
monitor
.
productCode
,
ProductCode
=
monitor
.
productCode
,
ProductName
=
monitor
.
productName
,
ProductName
=
monitor
.
productName
,
Sn
=
monitor
.
sn
,
Sn
=
monitor
.
sn
,
...
@@ -251,6 +253,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -251,6 +253,7 @@ namespace Siger.ApiACC.Controllers
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
{
fixtureguid
=
fixtureToolsObj
.
FixtureGuid
,
fixtureguid
=
fixtureToolsObj
.
FixtureGuid
,
fixturename
=
fixtureToolsObj
.
FixtureName
,
projectId
=
ProjectId
,
projectId
=
ProjectId
,
section
=
loading
.
section
,
section
=
loading
.
section
,
sn
=
sn
,
sn
=
sn
,
...
...
Server/Apis/Siger.ApiACC/Tasks/AccRegistry.cs
View file @
99b73ad8
using
FluentScheduler
;
using
FluentScheduler
;
using
NPOI.SS.Formula.Functions
;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Log
;
using
Module
=
Siger
.
Middlelayer
.
Common
.
Module
;
using
Module
=
Siger
.
Middlelayer
.
Common
.
Module
;
...
@@ -11,7 +12,8 @@ namespace Siger.ApiACC.Tasks
...
@@ -11,7 +12,8 @@ namespace Siger.ApiACC.Tasks
//Logger.RegisterLogEngine(Module.Acc);
//Logger.RegisterLogEngine(Module.Acc);
//Schedule<AccCalculateTraceJob>().ToRunNow().AndEvery(30).Minutes();
//Schedule<AccCalculateTraceJob>().ToRunNow().AndEvery(30).Minutes();
Logger
.
RegisterTxtLogEngine
(
Module
.
Acc
);
Schedule
<
AutoMES
>().
ToRunNow
().
AndEvery
(
10
).
Seconds
();
}
}
}
}
}
}
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
View file @
99b73ad8
using
FluentScheduler
;
using
FluentScheduler
;
using
Newtonsoft.Json
;
using
Siger.Middlelayer.AccRepository.Request
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Common.Configuration
;
using
Siger.Middlelayer.Common.Helpers
;
using
Siger.Middlelayer.Common.Log
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -12,19 +18,103 @@ namespace Siger.ApiACC.Tasks
...
@@ -12,19 +18,103 @@ namespace Siger.ApiACC.Tasks
public
void
Execute
()
public
void
Execute
()
{
{
throw
new
NotImplementedException
();
Logger
.
WriteLineInfo
(
$"execute mes job"
);
var
projectId
=
GetProjectId
();
var
hostDic
=
GetHost
();
if
(
projectId
==
0
||
!
hostDic
.
Any
())
{
Logger
.
WriteLineInfo
(
$"配置未完整"
);
return
;
}
using
(
DBhelper
dbhelper
=
new
DBhelper
())
{
var
tasklist
=
dbhelper
.
GetTaskList
(
projectId
);
if
(!
tasklist
.
Any
())
{
Logger
.
WriteLineInfo
(
$"无任务下发"
);
return
;
}
var
tasks
=
tasklist
.
OrderBy
(
s
=>
s
.
actiontype
);
var
task
=
tasks
.
FirstOrDefault
();
var
sendToPLC
=
new
RequestPLC
{
RStation
=
task
.
sectionid
,
Fixture
=
task
.
fixtureguid
,
RequestForm
=
task
.
no
,
RobotStep
=
(
int
)
task
.
action
,
StorageNo
=
task
.
locationid
,
SN
=
task
.
sn
,
Program
=
task
.
programnumber
};
var
result
=
PushTask
(
hostDic
,
sendToPLC
,
out
string
message
);
if
(!
result
)
{
Logger
.
WriteLineError
(
$"TASK 下发失败 :
{
message
}
"
);
return
;
}
task
.
send
=
1
;
if
(!
dbhelper
.
UpdateTask
(
task
))
{
Logger
.
WriteLineError
(
$"更新TASK 下发状态失败"
);
}
}
}
}
public
void
Dispose
()
public
void
Dispose
()
{
{
throw
new
NotImplementedException
();
}
}
/// <summary>
/// 下发任务
/// </summary>
/// <param name="ip"></param>
/// <param name="port"></param>
/// <param name="request"></param>
/// <param name="msg"></param>
private
bool
PushTask
(
string
ip
,
RequestPLC
request
,
out
string
msg
)
{
msg
=
string
.
Empty
;
try
{
var
param
=
JsonHelper
.
SerializerToJsonString
(
request
);
var
retstring
=
HttpHelper
.
HttpPost
(
$"
{
ip
}{
CommonConst
.
SenTaskToMES
}
"
,
"application/json"
,
param
);
var
result
=
JsonConvert
.
DeserializeObject
<
ResponsePlC
>(
retstring
);
if
(
result
.
return_code
!=
0
)
{
msg
=
$"PushTask failed,URL
{
ip
}
input:
{
param
}
result :
{
result
.
return_desc
}
"
;
return
false
;
}
return
true
;
}
catch
(
Exception
ex
)
{
msg
=
ex
.
ToString
();
}
return
false
;
}
//获取TaskList
private
int
GetProjectId
()
private
List
<
int
>
GetTaskList
()
{
{
var
_pid
=
ConfigManager
.
GetValue
(
"ProjectSetting"
,
"ProjectId"
,
string
.
Empty
);
if
(
string
.
IsNullOrEmpty
(
_pid
))
Logger
.
WriteLineError
(
"DbSetting about [ProjectSetting] ProjectId not found."
);
return
int
.
Parse
(
_pid
);
}
private
string
GetHost
()
{
var
host
=
ConfigManager
.
GetValue
(
"ProjectSetting"
,
"Host"
,
string
.
Empty
);
if
(
string
.
IsNullOrEmpty
(
host
))
{
Logger
.
WriteLineError
(
"DbSetting about [ProjectSetting] Host not found."
);
return
null
;
}
return
host
;
return
new
List
<
int
>();
}
}
}
}
}
}
Server/Apis/Siger.ApiACC/Tasks/DBhelper.cs
View file @
99b73ad8
using
Siger.Middlelayer.AccRepository
;
using
Siger.Middlelayer.AccRepository
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.CncRepository
;
using
Siger.Middlelayer.CncRepository
;
using
Siger.Middlelayer.Repository
;
using
Siger.Middlelayer.Repository
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
static
Siger
.
Middlelayer
.
Share
.
Enum
.
ModuleEnum
.
Automation
;
namespace
Siger.ApiACC.Tasks
namespace
Siger.ApiACC.Tasks
{
{
public
class
DBhelper
public
class
DBhelper
:
IDisposable
{
{
private
static
DBhelper
_helper
;
public
static
DBhelper
Instance
=
_helper
??
(
_helper
=
new
DBhelper
());
p
ublic
ApiCncDbContext
CncDbContext
;
p
rivate
readonly
ApiCncDbContext
CncDbContext
;
p
ublic
ApiAccDbContext
AccDbContext
;
p
rivate
readonly
ApiAccDbContext
AccDbContext
;
p
ublic
ApiConfigDbContext
ConfigDbContext
;
p
rivate
readonly
ApiConfigDbContext
ConfigDbContext
;
static
DBhelper
()
public
DBhelper
()
{
}
public
void
LoadDbContext
()
{
{
CncDbContext
=
new
ApiCncDbContext
();
CncDbContext
=
new
ApiCncDbContext
();
AccDbContext
=
new
ApiAccDbContext
();
AccDbContext
=
new
ApiAccDbContext
();
ConfigDbContext
=
new
ApiConfigDbContext
();
ConfigDbContext
=
new
ApiConfigDbContext
();
}
}
public
List
<
int
>
GetTaskList
()
internal
bool
CanTask
(
int
projectId
,
int
section
)
{
{
return
new
List
<
int
>();
var
taskObj
=
AccDbContext
.
siger_automation_task_list
.
FirstOrDefault
(
f
=>
f
.
projectId
==
projectId
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(
taskObj
==
null
)
return
true
;
else
return
false
;
}
/// <summary>
/// 获取未推送tasklist
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public
IEnumerable
<
siger_automation_task_list
>
GetTaskList
(
int
projectId
)
{
var
taskObjs
=
AccDbContext
.
siger_automation_task_list
.
Where
(
f
=>
f
.
projectId
==
projectId
&&
f
.
send
==
0
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
return
taskObjs
;
}
public
siger_automation_fixture_tools_monitor
GetMonitor
(
int
section
)
{
return
AccDbContext
.
siger_automation_fixture_tools_moniter
.
FirstOrDefault
(
f
=>
f
.
section
==
section
);
}
public
bool
UpdateTask
(
siger_automation_task_list
taskNo
)
{
AccDbContext
.
siger_automation_task_list
.
Update
(
taskNo
);
return
AccDbContext
.
SaveChanges
()
>
0
;
}
}
public
void
Dispose
()
public
void
Dispose
()
{
{
...
@@ -37,5 +62,6 @@ namespace Siger.ApiACC.Tasks
...
@@ -37,5 +62,6 @@ namespace Siger.ApiACC.Tasks
AccDbContext
?.
Dispose
();
AccDbContext
?.
Dispose
();
ConfigDbContext
?.
Dispose
();
ConfigDbContext
?.
Dispose
();
}
}
}
}
}
}
Server/Apis/Siger.ApiCNC/Tasks/CncRegistry.cs
View file @
99b73ad8
...
@@ -9,7 +9,7 @@ namespace Siger.ApiCNC.Tasks
...
@@ -9,7 +9,7 @@ namespace Siger.ApiCNC.Tasks
{
{
public
CncRegistry
()
public
CncRegistry
()
{
{
Schedule
<
ProduceEfficiencyJob
>().
ToRunNow
().
AndEvery
(
1
).
Days
().
At
(
3
,
0
);
//
Schedule<ProduceEfficiencyJob>().ToRunNow().AndEvery(1).Days().At(3,0);
}
}
}
}
}
}
Server/Common/Siger.Middlelayer.Share/Constant/CommonConst.cs
View file @
99b73ad8
...
@@ -105,5 +105,7 @@
...
@@ -105,5 +105,7 @@
/// 罗美特追溯附件 存放路径
/// 罗美特追溯附件 存放路径
/// </summary>
/// </summary>
public
const
string
MetekAttachmentFilePath
=
"attachment"
;
public
const
string
MetekAttachmentFilePath
=
"attachment"
;
public
const
string
SenTaskToMES
=
"/distributiontask"
;
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_fixture_tools_monitor.cs
View file @
99b73ad8
...
@@ -11,6 +11,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -11,6 +11,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
/// </summary>
public
string
fixtureguid
{
get
;
set
;
}
public
string
fixtureguid
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 工装名称
/// </summary>
public
string
fixturename
{
get
;
set
;
}
/// <summary>
/// 当前工站ID
/// 当前工站ID
/// </summary>
/// </summary>
public
int
section
{
get
;
set
;
}
public
int
section
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
99b73ad8
...
@@ -28,7 +28,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -28,7 +28,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
where
q
.
projectId
==
projectId
&&
q
.
productcode
==
productCode
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
where
q
.
projectId
==
projectId
&&
q
.
productcode
==
productCode
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseProductFixtureInfo
select
new
ResponseProductFixtureInfo
{
{
Fixture
Id
=
t
.
id
,
Fixture
Name
=
t
.
name
,
FixtureGuid
=
t
.
guid
,
FixtureGuid
=
t
.
guid
,
ProductCode
=
q
.
productcode
,
ProductCode
=
q
.
productcode
,
Location
=
l
.
locationid
,
Location
=
l
.
locationid
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
99b73ad8
...
@@ -122,7 +122,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -122,7 +122,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
select
new
ResponseProductFixtureInfo
select
new
ResponseProductFixtureInfo
{
{
FixtureGuid
=
q
.
guid
,
FixtureGuid
=
q
.
guid
,
FixtureId
=
q
.
id
,
FixtureName
=
q
.
name
,
Location
=
l
.
locationid
Location
=
l
.
locationid
};
};
return
query
.
FirstOrDefault
();
return
query
.
FirstOrDefault
();
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestPLC.cs
0 → 100644
View file @
99b73ad8
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Siger.Middlelayer.AccRepository.Request
{
public
class
RequestPLC
{
/// <summary>
/// 工件唯一识别SN
/// </summary>
public
String
SN
{
get
;
set
;
}
/// <summary>
/// 工装唯一编号GUID
/// </summary>
public
string
Fixture
{
get
;
set
;
}
/// <summary>
/// 任务唯一编号
/// </summary>
public
string
RequestForm
{
get
;
set
;
}
/// <summary>
/// 机器人动作指令
/// </summary>
public
int
RobotStep
{
get
;
set
;
}
/// <summary>
/// 发起地
/// </summary>
public
int
RStation
{
get
;
set
;
}
/// <summary>
/// 储位位置编号
/// </summary>
public
int
StorageNo
{
get
;
set
;
}
/// <summary>
/// 加工程序号 ,上料完成后自动加工需要
/// </summary>
public
string
Program
{
get
;
set
;
}
}
public
class
ResponsePlC
{
public
int
return_code
{
get
;
set
;
}
public
string
return_desc
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseProductFixtureInfo.cs
View file @
99b73ad8
...
@@ -7,9 +7,10 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -7,9 +7,10 @@ namespace Siger.Middlelayer.AccRepository.Response
public
class
ResponseProductFixtureInfo
public
class
ResponseProductFixtureInfo
{
{
/// <summary>
/// <summary>
/// 工装
ID
/// 工装
名称
/// </summary>
/// </summary>
public
int
FixtureId
{
get
;
set
;
}
public
string
FixtureName
{
get
;
set
;
}
/// <summary>
/// <summary>
/// GUID
/// GUID
/// </summary>
/// </summary>
...
...
Server/Infrastructure/Script/DB.script
View file @
99b73ad8
...
@@ -351,19 +351,22 @@ CREATE TABLE IF NOT EXISTS `siger_automation_task_list` (
...
@@ -351,19 +351,22 @@ CREATE TABLE IF NOT EXISTS `siger_automation_task_list` (
-- ----------------------------
-- ----------------------------
-- 设备可用状态
-- 设备可用状态
-- Table structure for siger_automation_
task_list
-- Table structure for siger_automation_
machine_status
-- ----------------------------
-- ----------------------------
DROP TABLE IF EXISTS `siger_automation_machine_status`;
DROP TABLE IF EXISTS `siger_automation_machine_status`;
CREATE TABLE `siger_automation_machine_status` (
CREATE TABLE `siger_automation_machine_status` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id` int NOT NULL AUTO_INCREMENT,
`section` int(11) NOT NULL DEFAULT 0 COMMENT '工位ID',
`section` int NOT NULL DEFAULT '0' COMMENT '工位ID',
`machineid` int(11) NOT NULL DEFAULT 0 COMMENT '工位对应设备ID',
`machineid` int NOT NULL DEFAULT '0' COMMENT '工位对应设备ID',
`projectid` int(11) NOT NULL DEFAULT 0,
`projectid` int NOT NULL DEFAULT '0',
`enable` int(1) NOT NULL DEFAULT 1 COMMENT '设备可用状态 0:不可用 1:可用',
`enable` int NOT NULL DEFAULT '1' COMMENT '设备可用状态 0:不可用 1:可用',
`status` int(1) NOT NULL DEFAULT 1 COMMENT '完工状态 0:取消 1:待生产 2:生产中 3:生产完成 ',
`status` int NOT NULL DEFAULT '1' COMMENT '完工状态 0:取消 1:待生产 2:生产中 3:生产完成 ',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
`updatetime` datetime DEFAULT NULL COMMENT '操作时间',
`program` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '程序号',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS=1;
-- ----------------------------
-- ----------------------------
...
@@ -414,6 +417,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
...
@@ -414,6 +417,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id` int(11) NOT NULL AUTO_INCREMENT,
`projectid` int(11) NOT NULL DEFAULT 0,
`projectid` int(11) NOT NULL DEFAULT 0,
`fixtureguid` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工装ID',
`fixtureguid` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工装ID',
`fixturename` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工装名称',
`section` int(11) NOT NULL DEFAULT 0 COMMENT '当前工站ID',
`section` int(11) NOT NULL DEFAULT 0 COMMENT '当前工站ID',
`sn` 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 '当前绑定工件',
`route` int(1) NOT NULL DEFAULT 1 COMMENT '工序ID',
`route` int(1) NOT NULL DEFAULT 1 COMMENT '工序ID',
...
@@ -428,18 +432,6 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
...
@@ -428,18 +432,6 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `siger_automation_machine_status`;
CREATE TABLE `siger_automation_machine_status` (
`id` int NOT NULL AUTO_INCREMENT,
`section` int NOT NULL DEFAULT '0' COMMENT '工位ID',
`machineid` int NOT NULL DEFAULT '0' COMMENT '工位对应设备ID',
`projectid` int NOT NULL DEFAULT '0',
`enable` int NOT NULL DEFAULT '1' COMMENT '设备可用状态 0:不可用 1:可用',
`status` int NOT NULL DEFAULT '1' COMMENT '完工状态 0:取消 1:待生产 2:生产中 3:生产完成 ',
`updatetime` datetime DEFAULT NULL COMMENT '操作时间',
`program` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '程序号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS=1;
SET FOREIGN_KEY_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
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