CREATE TABLE `siger_qms_inspection_standard_option` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `standardid` int(11) NOT NULL DEFAULT '0' COMMENT 'siger_qms_inspection_standard表id',
  `option` varchar(200) NOT NULL DEFAULT '' COMMENT '值选项',
  `option_type` int(2) NOT NULL DEFAULT '1' COMMENT '1---OK，2---NG',
  `status` int(2) NOT NULL DEFAULT '1',
  `projectid` int(2) NOT NULL,
  `optionValue` int(2) NOT NULL DEFAULT '1' COMMENT '1->勾选 0->未勾选',
  PRIMARY KEY (`id`) USING BTREE
)




2020/08/17
ALTER TABLE siger_tr_assemb_details ADD COLUMN number int(20) DEFAULT 0 COMMENT '数量';

-- ----------------------------
-- Table structure for siger_tr_assist_materials
-- ----------------------------
-- DROP TABLE IF EXISTS `siger_tr_assist_materials`;
CREATE TABLE `siger_tr_assist_materials` (
  `id` int NOT NULL AUTO_INCREMENT,
  `productcode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品编号',
  `workordertype` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '工单类型',
  `wo` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '工单号',
  `batch` varchar(500) NOT NULL COMMENT '批次号码',
  `serial` varchar(500) NOT NULL COMMENT '序号',
  `transdatetime` datetime NOT NULL COMMENT '同步时间',
  `lastupdatetime` datetime NOT NULL COMMENT '最后更新时间',
  `specification` varchar(255) NOT NULL DEFAULT '' COMMENT '规格',
  `pn` varchar(255) NOT NULL DEFAULT '' COMMENT '料号',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '辅料名称',
  `number` int NOT NULL DEFAULT '0' COMMENT '数量',
  `status` int NOT NULL DEFAULT '1',
  `projectId` int NOT NULL DEFAULT '0',
  `printCount` int(11) NOT NULL DEFAULT '0' COMMENT '打印次数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS=1;


-- ----------------------------
-- Table structure for siger_project_order_type
-- ----------------------------
-- DROP TABLE IF EXISTS `siger_project_order_type`;
CREATE TABLE `siger_project_order_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `projectId` int DEFAULT '0',
  `code` varchar(250) DEFAULT NULL,
  `name` varchar(250) DEFAULT NULL COMMENT '名称',
  `createDate` datetime NOT NULL COMMENT '最后更新时间',
  `status` int DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS=1;


ALTER TABLE siger_tr_sn_list ADD COLUMN WoType varchar(250) DEFAULT 0 COMMENT '订单类型';
ALTER TABLE siger_tr_sn_list ADD COLUMN PrintCount int(20) DEFAULT 0 COMMENT '数量';
ALTER TABLE siger_tr_sn_trace ADD COLUMN type int(11) NOT NULL DEFAULT '0' COMMENT '0=>正常数据  1=>追溯';


-- DROP TABLE IF EXISTS `siger_tr_serinumCfg`;
CREATE TABLE `siger_tr_serinumCfg` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ProjectId` int(7) NOT NULL,
  `Rule` int(10) DEFAULT NULL COMMENT '规则类型 1:sn 2:box',
  `Seq` int(7) DEFAULT NULL,
  `ProductID` varchar(200) DEFAULT NULL,
  `ItemType` int(7) DEFAULT '0',
  `TypeFormat` varchar(20) DEFAULT NULL,
  `ItemValue` varchar(500) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `length` int(10) DEFAULT NULL COMMENT '长度',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS=1;


