CREATE DATABASE `yxt_supervise_cyf` /*!40100 DEFAULT CHARACTER SET utf8mb4 */

DROP TABLE IF EXISTS `tank_information`;
CREATE TABLE `tank_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐编号',
`capacity` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐容量',
`crudeSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐所属原油类型',
`inventory` double(100, 2) NULL DEFAULT NULL COMMENT '油罐库存',
  `initialInventory` double(100, 2) NULL DEFAULT NULL COMMENT '油罐初始库存',
  `existingInventory` double(100, 2) NULL DEFAULT NULL COMMENT '油罐当天现有库存（当天填写）',
  `flowmeterSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计sid',
  `height` double(100, 2) NULL DEFAULT NULL COMMENT '油罐高度',
  `bottomArea` double(100, 3) NULL DEFAULT NULL COMMENT '油罐底面积',
  `density` double(100, 2) NULL DEFAULT NULL COMMENT '油的密度',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '油罐信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;



DROP TABLE IF EXISTS `crude_oil_type_information`;
CREATE TABLE `crude_oil_type_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油编号',
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油code',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油类型' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `crude_oil_storage`;
CREATE TABLE `crude_oil_storage`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`contractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同号',
`supplierSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供货商sid`',
`contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同签订日期',
`licensePlateNumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发货车牌号',
`tankSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
`weight` double(255, 2) NULL DEFAULT NULL COMMENT '收料净重',
  `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收料价值',
  `warehousingDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '入库日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油入库' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;



DROP TABLE IF EXISTS `crude_oil_outbound`;
CREATE TABLE `crude_oil_outbound`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`salesContractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '销售合同号',
`contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签订日期',
`tankSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
`weight` double(100, 2) NULL DEFAULT NULL COMMENT '净重',
  `value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '价值',
  `deliveryDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出库时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油出库记录' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `crude_oil_inventory_record`;
CREATE TABLE `crude_oil_inventory_record`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`existingInventory` double(100, 2) NULL DEFAULT NULL COMMENT '当日库存记录（每日填写）',
  `tankSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
  `recordDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录日期',
  `height` double(100, 2) NULL DEFAULT NULL COMMENT '油罐高度',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油库存记录表(每日填写)' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;



DROP TABLE IF EXISTS `flowmeter_information`;
CREATE TABLE `flowmeter_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计编号',
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计code',
`tankSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '流量计信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `material_inventory`;
CREATE TABLE `material_inventory`(
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料编号',
`inventory` double(100, 0) NULL DEFAULT NULL COMMENT '物料库存',
`initialInventory` double(100, 0) NULL DEFAULT NULL COMMENT '物料初始库存',
`typeSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料类型sid',
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:原料2包装物',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物料库存' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `material_inventory_record`;
CREATE TABLE `material_inventory_record`(
 `id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
 `sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
 `lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
 `createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
 `modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
 `isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
 `state` int(0) NULL DEFAULT 1 COMMENT '状态',
 `isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
 `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
 `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
 `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
 `inventoryDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '盘库日期',
 `inventory` double(100, 2) NULL DEFAULT NULL COMMENT '库存数量',
`value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '价值',
`inventorySid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料库存类型sid',
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:原料2包装物',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物料盘库记录' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `material_outbound`;
CREATE TABLE `material_outbound`(
 `id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
 `sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
 `lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
 `createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
 `modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
 `isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
 `state` int(0) NULL DEFAULT 1 COMMENT '状态',
 `isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
 `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
 `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
 `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
 `salesContractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '销售合同号',
 `contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同签订日期',
 `deliveryDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出库日期',
 `inventorySid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料库存sid',
 `weight` double(100, 2) NULL DEFAULT NULL COMMENT '净重',
`value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '价值',
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:原料2包装物',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物料出库信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `material_storage`;
CREATE TABLE `material_storage`(
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`contractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同号',
`supplierSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供货商sid`',
`contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同签订日期',
`licensePlateNumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发货车牌号',
`inventorySid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料库存sid',
`weight` double(255, 0) NULL DEFAULT NULL COMMENT '收料净重',
`value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收料价值',
`warehousingDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '入库日期',
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:原料2包装物',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物料入库信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `material_type`;
CREATE TABLE `material_type`(
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料类型名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料编号',
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料code',
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:原料2包装物',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物料类型' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `curde_oil_storage_file`;
CREATE TABLE `crude_oil_storage_file`  (
`id` int(0) NOT NULL AUTO_INCREMENT,
`sid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件地址',
`mainSid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主表sid  原油库存',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油入库附件' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
    

DROP TABLE IF EXISTS `crude_oil_outbound_file`;
CREATE TABLE `crude_oil_outbound_file`  (
`id` int(0) NOT NULL AUTO_INCREMENT,
`sid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件地址',
`mainSid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主表sid 原油出库',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油出库附件' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `crude_oil_record_file`;
CREATE TABLE `crude_oil_record_file`  (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件地址',
`mainSid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主表sid 原油库存记录附件',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '原油库存记录附件' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `supplier_information`;
CREATE TABLE `supplier_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`supplierName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商名称',
`supplierCode` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商code',
`supplierNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商编号',
`contacts` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人',
`telephone` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '供应商信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;