/*
 Navicat MySQL Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50740 (5.7.40-log)
 Source Host           : localhost:3306
 Source Schema         : hkcdb

 Target Server Type    : MySQL
 Target Server Version : 50740 (5.7.40-log)
 File Encoding         : 65001

 Date: 26/08/2025 14:39:02
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for account_book_g2
-- ----------------------------
DROP TABLE IF EXISTS `account_book_g2`;
CREATE TABLE `account_book_g2`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `drug_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `type` int(1) NULL DEFAULT 1 COMMENT '1领入2发出3日结4总结5转结',
  `department` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '科室',
  `invoice_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备内记录凭证',
  `order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处方号或凭证号',
  `manu_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次',
  `eff_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '效期',
  `yesterday_quantity` int(11) NULL DEFAULT NULL COMMENT '上日结存',
  `add_quantity` int(11) NULL DEFAULT NULL COMMENT '收入',
  `out_quantity` int(11) NULL DEFAULT NULL COMMENT '发出',
  `manu_stock` int(11) NULL DEFAULT NULL COMMENT '批次结存',
  `total_stock` int(11) NULL DEFAULT NULL COMMENT '总结村',
  `user_id1` int(11) NULL DEFAULT NULL COMMENT '发药领药人id',
  `user_id2` int(11) NULL DEFAULT NULL COMMENT '复核人id',
  `machine_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备id',
  `create_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '插入更新时间',
  `shoushuJian` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手术间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 33034 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
