金川镍盐蝌蚪文.sql 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  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;