金川镍盐蝌蚪文.sql 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- 蝌蚪文需求建表语句
  2. CREATE TABLE `fct_agv1` (
  3. `ID` varchar(50) NOT NULL COMMENT 'ID',
  4. `SLOT` varchar(50) NOT NULL COMMENT '生产批号',
  5. `SPLT` varchar(50) NOT NULL COMMENT '产品托盘号',
  6. `SPROD` varchar(50) NOT NULL COMMENT '产品',
  7. `SSHIFT` varchar(50) NOT NULL COMMENT '班组',
  8. `CREATEDATE` datetime NOT NULL COMMENT '创建时间',
  9. `CREATEBY` varchar(50) NOT NULL COMMENT '创建人',
  10. `STATUS` varchar(10) NOT NULL COMMENT '状态 0-未处理 1-AGV处理 2-人工处理 默认传0',
  11. `SPRODTYPE` varchar(10) NOT NULL COMMENT '类型 硫酸镍-LSN 氯化镍-LHN',
  12. PRIMARY KEY (`ID`)
  13. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批号相关信息表(BMS系统直连)';
  14. CREATE TABLE `fct_agv2` (
  15. `ID` varchar(50) NOT NULL COMMENT 'ID',
  16. `SLOT` varchar(50) NOT NULL COMMENT '生产批号',
  17. `ISQCL` varchar(10) NOT NULL COMMENT '是否质检(Y:已质检 N:未质检)',
  18. `DSQCDATE` date NOT NULL COMMENT '质检时间',
  19. `PROCESSFLAG` varchar(10) NOT NULL COMMENT '是否已处理(Y:已处理 N:未处理)由AGV更新',
  20. `CREATEDATE` date NOT NULL COMMENT '创建时间',
  21. `CREATEBY` varchar(50) NOT NULL,
  22. PRIMARY KEY (`ID`)
  23. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='质检相关信息(BMS系统直连)';
  24. -- 给蝌蚪文系统账号赋权限
  25. CREATE USER `KDW`@`%` IDENTIFIED WITH mysql_native_password;
  26. GRANT Delete, Insert, Select, Update ON TABLE `warewms-jnmc-jinco`.`fct_agv1` TO `KDW`@`%`;
  27. GRANT Delete, Insert, Select, Update ON TABLE `warewms-jnmc-jinco`.`fct_agv2` TO `KDW`@`%`;
  28. ALTER USER `KDW`@`%` IDENTIFIED WITH mysql_native_password BY 'kdwadmin';
  29. FLUSH PRIVILEGES;
  30. UPDATE `base_sku` SET `sku_type` = '1', `specs` = NULL, `model` = NULL, `desc1` = '氯化镍', `desc2` = 'LHN', `self_code1` = NULL, `self_code2` = NULL, `hazard_flag` = 'N', `pack_id` = NULL, `tare` = NULL, `grossweight` = NULL, `netweight` = NULL, `active_flag` = 'Y', `putaway_location` = NULL, `putaway_zone` = NULL, `putaway_rule` = NULL, `sku_high` = NULL, `sku_length` = NULL, `sku_width` = NULL, `qtymax` = NULL, `qtymin` = NULL, `default_receiving_uom` = NULL, `default_shipment_uom` = NULL, `qc_rule` = NULL, `qc_time` = NULL, `shelflife` = NULL, `cold_flag` = 'N', `sterilization_flag` = 'N', `curing_cycle` = NULL, `manufacturer` = NULL, `userdefine1` = NULL, `userdefine2` = NULL, `userdefine3` = NULL, `userdefine4` = NULL, `userdefine5` = NULL, `userdefine6` = NULL, `userdefine7` = NULL, `userdefine8` = NULL, `userdefine9` = NULL, `userdefine10` = NULL, `expiration_date_check` = 'N', `overcharge_check` = 'Y', `qc_check` = 'N', `create_by` = '', `create_time` = '2023-05-23 16:09:05', `update_by` = '', `update_time` = NULL, `remark` = NULL WHERE `customer_id` = 'default' AND `sku` = 'NiCl2';
  31. UPDATE `base_sku` SET `sku_type` = '1', `specs` = NULL, `model` = NULL, `desc1` = '硫酸镍', `desc2` = 'LSN', `self_code1` = NULL, `self_code2` = NULL, `hazard_flag` = 'N', `pack_id` = NULL, `tare` = NULL, `grossweight` = NULL, `netweight` = NULL, `active_flag` = 'Y', `putaway_location` = NULL, `putaway_zone` = NULL, `putaway_rule` = NULL, `sku_high` = NULL, `sku_length` = NULL, `sku_width` = NULL, `qtymax` = NULL, `qtymin` = NULL, `default_receiving_uom` = NULL, `default_shipment_uom` = NULL, `qc_rule` = NULL, `qc_time` = NULL, `shelflife` = NULL, `cold_flag` = 'N', `sterilization_flag` = 'N', `curing_cycle` = NULL, `manufacturer` = NULL, `userdefine1` = NULL, `userdefine2` = NULL, `userdefine3` = NULL, `userdefine4` = NULL, `userdefine5` = NULL, `userdefine6` = NULL, `userdefine7` = NULL, `userdefine8` = NULL, `userdefine9` = NULL, `userdefine10` = NULL, `expiration_date_check` = 'N', `overcharge_check` = 'Y', `qc_check` = 'N', `create_by` = '', `create_time` = '2023-05-23 16:04:42', `update_by` = '', `update_time` = NULL, `remark` = NULL WHERE `customer_id` = 'default' AND `sku` = 'NiSO4';