/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.123.161
 Source Server Type    : Oracle
 Source Server Version : 110200
 Source Host           : 192.168.123.161:1521
 Source Schema         : BASE

 Target Server Type    : Oracle
 Target Server Version : 110200
 File Encoding         : 65001

 Date: 01/08/2019 20:32:06
*/


-- ----------------------------
-- Table structure for D_AJXXSJY
-- ----------------------------
DROP TABLE D_AJXXSJY;
CREATE TABLE D_AJXXSJY (
  AJBH VARCHAR2(30 BYTE) NOT NULL ,
  AJMC VARCHAR2(20 BYTE) ,
  CFBH VARCHAR2(30 BYTE) ,
  AJCD NUMBER(3,1) ,
  AJKD NUMBER(3,1) ,
  AJGD NUMBER(3,1) ,
  AJSJCR NUMBER(8) ,
  AJSJCR01 NUMBER(8) ,
  LXDH VARCHAR2(15 BYTE) ,
  QYRQ DATE ,
  AJZT VARCHAR2(8 BYTE) ,
  AJSYZT VARCHAR2(8 BYTE) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_AJXXSJY.AJBH IS '廒间编号（仓房编码+001 三位序号）';
COMMENT ON COLUMN D_AJXXSJY.AJMC IS '廒间名称';
COMMENT ON COLUMN D_AJXXSJY.CFBH IS '所属仓房编号';
COMMENT ON COLUMN D_AJXXSJY.AJCD IS '廒间长度';
COMMENT ON COLUMN D_AJXXSJY.AJKD IS '廒间宽度';
COMMENT ON COLUMN D_AJXXSJY.AJGD IS '廒间高度';
COMMENT ON COLUMN D_AJXXSJY.AJSJCR IS '廒间设计仓容';
COMMENT ON COLUMN D_AJXXSJY.AJSJCR01 IS '廒间实际仓容';
COMMENT ON COLUMN D_AJXXSJY.LXDH IS '联系电话';
COMMENT ON COLUMN D_AJXXSJY.QYRQ IS '启用日期';
COMMENT ON COLUMN D_AJXXSJY.AJZT IS '廒间状态';
COMMENT ON COLUMN D_AJXXSJY.AJSYZT IS '廒间使用状态';
COMMENT ON COLUMN D_AJXXSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_AJXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_AJXXSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_AJXXSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_AJXXSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_AJXXSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_AJXXSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_AJXXSJY.REMARK IS '备注';
COMMENT ON TABLE D_AJXXSJY IS '廒间信息表';

-- ----------------------------
-- Records of D_AJXXSJY
-- ----------------------------
INSERT INTO D_AJXXSJY VALUES ('string001001001', 'string001001001', 'string001001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-25 21:08:06.633653', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-25 21:10:38.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_CFXXSJY
-- ----------------------------
DROP TABLE D_CFXXSJY;
CREATE TABLE D_CFXXSJY (
  CFBH VARCHAR2(30 BYTE) NOT NULL ,
  CFMC VARCHAR2(20 BYTE) ,
  KDDM VARCHAR2(30 BYTE) ,
  CFLX VARCHAR2(20 BYTE) ,
  CFJG VARCHAR2(20 BYTE) ,
  JZLX VARCHAR2(20 BYTE) ,
  CFCD NUMBER(3,1) ,
  CFKD NUMBER(3,1) ,
  CFGD NUMBER(3,1) ,
  SJCR NUMBER(8) ,
  SJCR01 NUMBER(8) ,
  LXDH VARCHAR2(15 BYTE) ,
  JD NUMBER(10,6) ,
  WD NUMBER(10,6) ,
  QYRQ DATE ,
  CFZT VARCHAR2(8 BYTE) ,
  JSND VARCHAR2(4 BYTE) ,
  DCZLRJ NUMBER(8) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_CFXXSJY.CFBH IS '仓房编号（库点编码+001 三位序号）';
COMMENT ON COLUMN D_CFXXSJY.CFMC IS '仓房名称';
COMMENT ON COLUMN D_CFXXSJY.KDDM IS '所属库点编码';
COMMENT ON COLUMN D_CFXXSJY.CFLX IS '仓房类型';
COMMENT ON COLUMN D_CFXXSJY.CFJG IS '仓房结构';
COMMENT ON COLUMN D_CFXXSJY.JZLX IS '建筑类型';
COMMENT ON COLUMN D_CFXXSJY.CFCD IS '仓房长度';
COMMENT ON COLUMN D_CFXXSJY.CFKD IS '仓房宽度';
COMMENT ON COLUMN D_CFXXSJY.CFGD IS '仓房高度';
COMMENT ON COLUMN D_CFXXSJY.SJCR IS '设计仓容';
COMMENT ON COLUMN D_CFXXSJY.SJCR01 IS '实际仓容';
COMMENT ON COLUMN D_CFXXSJY.LXDH IS '联系电话';
COMMENT ON COLUMN D_CFXXSJY.JD IS '经度';
COMMENT ON COLUMN D_CFXXSJY.WD IS '纬度';
COMMENT ON COLUMN D_CFXXSJY.QYRQ IS '启用日期';
COMMENT ON COLUMN D_CFXXSJY.CFZT IS '仓房状态';
COMMENT ON COLUMN D_CFXXSJY.JSND IS '建设年代';
COMMENT ON COLUMN D_CFXXSJY.DCZLRJ IS '单仓装粮容积';
COMMENT ON COLUMN D_CFXXSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_CFXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_CFXXSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_CFXXSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_CFXXSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_CFXXSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_CFXXSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_CFXXSJY.REMARK IS '备注';
COMMENT ON TABLE D_CFXXSJY IS '仓房信息';

-- ----------------------------
-- Records of D_CFXXSJY
-- ----------------------------
INSERT INTO D_CFXXSJY VALUES ('string001001', '1111111111ss', 'string001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-25 21:05:05.043353', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-25 21:07:23.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_CFZTSJY
-- ----------------------------
DROP TABLE D_CFZTSJY;
CREATE TABLE D_CFZTSJY (
  CFBH VARCHAR2(30 BYTE) NOT NULL ,
  CFMC VARCHAR2(20 BYTE) ,
  KDDM VARCHAR2(30 BYTE) ,
  XCSJCBL NUMBER(8) ,
  SFGZ VARCHAR2(1 BYTE) ,
  GZSJ DATE ,
  SFLKZNHSJXM VARCHAR2(1 BYTE) ,
  CDNFFL VARCHAR2(1 BYTE) ,
  CQNFFS VARCHAR2(1 BYTE) ,
  CDNFFC VARCHAR2(1 BYTE) ,
  MCSFYM VARCHAR2(1 BYTE) ,
  CFNFGRBL VARCHAR2(1 BYTE) ,
  CFNFSZCC VARCHAR2(1 BYTE) ,
  YWFSFQZZ VARCHAR2(1 BYTE) ,
  YWFHFDCS VARCHAR2(1 BYTE) ,
  YWJXTFSS VARCHAR2(1 BYTE) ,
  NFMBXZSC VARCHAR2(1 BYTE) ,
  YWLQJCSB VARCHAR2(1 BYTE) ,
  YWLSZNCRKXT VARCHAR2(1 BYTE) ,
  YWZNLQCKXT VARCHAR2(1 BYTE) ,
  YWZNAFJKXT VARCHAR2(1 BYTE) ,
  YWLKZHYWGLXT VARCHAR2(1 BYTE) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_CFZTSJY.CFBH IS '仓房编号（库点编码+001 三位序号）';
COMMENT ON COLUMN D_CFZTSJY.CFMC IS '仓房名称';
COMMENT ON COLUMN D_CFZTSJY.KDDM IS '所属库点编码';
COMMENT ON COLUMN D_CFZTSJY.XCSJCBL IS '现存省级储备粮';
COMMENT ON COLUMN D_CFZTSJY.SFGZ IS '是否改造';
COMMENT ON COLUMN D_CFZTSJY.GZSJ IS '改造时间';
COMMENT ON COLUMN D_CFZTSJY.SFLKZNHSJXM IS '是否粮库智能化升级项目';
COMMENT ON COLUMN D_CFZTSJY.CDNFFL IS '仓顶能否防漏';
COMMENT ON COLUMN D_CFZTSJY.CQNFFS IS '仓墙能否防湿';
COMMENT ON COLUMN D_CFZTSJY.CDNFFC IS '仓底能否防潮';
COMMENT ON COLUMN D_CFZTSJY.MCSFYM IS '门窗是否严密';
COMMENT ON COLUMN D_CFZTSJY.CFNFGRBL IS '仓房能否隔热保冷';
COMMENT ON COLUMN D_CFZTSJY.CFNFSZCC IS '仓房能否散装储存';
COMMENT ON COLUMN D_CFZTSJY.YWFSFQZZ IS '有无防鼠防雀装置';
COMMENT ON COLUMN D_CFZTSJY.YWFHFDCS IS '有无防火防盗措施';
COMMENT ON COLUMN D_CFZTSJY.YWJXTFSS IS '有无机械通风设施';
COMMENT ON COLUMN D_CFZTSJY.NFMBXZSC IS '能否密闭熏蒸杀虫';
COMMENT ON COLUMN D_CFZTSJY.YWLQJCSB IS '有无粮情检测设备';
COMMENT ON COLUMN D_CFZTSJY.YWLSZNCRKXT IS '有无粮食智能出入库系统';
COMMENT ON COLUMN D_CFZTSJY.YWZNLQCKXT IS '有无智能粮情测控系统';
COMMENT ON COLUMN D_CFZTSJY.YWZNAFJKXT IS '有无智能安防监控系统';
COMMENT ON COLUMN D_CFZTSJY.YWLKZHYWGLXT IS '有无粮库综合业务管理系统';
COMMENT ON COLUMN D_CFZTSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_CFZTSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_CFZTSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_CFZTSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_CFZTSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_CFZTSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_CFZTSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_CFZTSJY.REMARK IS '备注';
COMMENT ON TABLE D_CFZTSJY IS '仓房状态信息';

-- ----------------------------
-- Table structure for D_HWXXSJY
-- ----------------------------
DROP TABLE D_HWXXSJY;
CREATE TABLE D_HWXXSJY (
  HWBH VARCHAR2(30 BYTE) NOT NULL ,
  HWMC VARCHAR2(30 BYTE) ,
  AJBH VARCHAR2(27 BYTE) ,
  QYRQ DATE ,
  HWZT VARCHAR2(1 BYTE) ,
  HWCR NUMBER(8) ,
  STATUS NUMBER DEFAULT ('1')  ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_HWXXSJY.HWBH IS '货位编号（仓房编码+001 三位序号）';
COMMENT ON COLUMN D_HWXXSJY.HWMC IS '货位名称';
COMMENT ON COLUMN D_HWXXSJY.AJBH IS '廒间编号';
COMMENT ON COLUMN D_HWXXSJY.QYRQ IS '启用日期';
COMMENT ON COLUMN D_HWXXSJY.HWZT IS '货位状态';
COMMENT ON COLUMN D_HWXXSJY.HWCR IS '货位仓容';
COMMENT ON COLUMN D_HWXXSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_HWXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_HWXXSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_HWXXSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_HWXXSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_HWXXSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_HWXXSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_HWXXSJY.REMARK IS '备注';
COMMENT ON TABLE D_HWXXSJY IS '货位信息数据源';

-- ----------------------------
-- Records of D_HWXXSJY
-- ----------------------------
INSERT INTO D_HWXXSJY VALUES ('string001001001001', 'string', 'string001001001', NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-26 09:16:53.215115', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-26 09:29:18.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_KDXXSJY
-- ----------------------------
DROP TABLE D_KDXXSJY;
CREATE TABLE D_KDXXSJY (
  KDDM VARCHAR2(30 BYTE) NOT NULL ,
  KDMC VARCHAR2(50 BYTE) ,
  KDJC VARCHAR2(20 BYTE) ,
  KDQYXZ VARCHAR2(2 BYTE) ,
  TYSHXYDM VARCHAR2(18 BYTE) ,
  QYMC VARCHAR2(50 BYTE) ,
  LKLB VARCHAR2(20 BYTE) ,
  JCRQ DATE ,
  SJCR NUMBER(18) ,
  KDYXCR NUMBER(18,3) ,
  XZQHMC VARCHAR2(50 BYTE) ,
  XZQHDM VARCHAR2(6 BYTE) ,
  CFS NUMBER ,
  YZKQS NUMBER ,
  YGSL NUMBER ,
  YXGR NUMBER(10,2) ,
  KDMJ NUMBER(10,2) ,
  KDDH VARCHAR2(30 BYTE) ,
  KDDZ VARCHAR2(128 BYTE) ,
  KDCZ VARCHAR2(30 BYTE) ,
  KDYB VARCHAR2(6 BYTE) ,
  KDJD VARCHAR2(20 BYTE) ,
  KDWD VARCHAR2(20 BYTE) ,
  JLGLLB VARCHAR2(1 BYTE) ,
  JLGLJL NUMBER(15) ,
  SFFHWRY VARCHAR2(1 BYTE) ,
  YWXFSY VARCHAR2(1 BYTE) ,
  YWXFSS VARCHAR2(1 BYTE) ,
  YWJHYS VARCHAR2(1 BYTE) ,
  JCCSB_QCH NUMBER(8) ,
  FHBZNX NUMBER(15) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_KDXXSJY.KDDM IS '库点代码（统一社会信用代码+001 三位序号）';
COMMENT ON COLUMN D_KDXXSJY.KDMC IS '库点名称';
COMMENT ON COLUMN D_KDXXSJY.KDJC IS '库点简称';
COMMENT ON COLUMN D_KDXXSJY.KDQYXZ IS '库点企业性质(01:国有企业；02：民营企业；03：事业单位;10:港澳台商投资企业；11外商投资企业；12：其他内资企业)';
COMMENT ON COLUMN D_KDXXSJY.TYSHXYDM IS '所属企业代码（统一社会信用代码）';
COMMENT ON COLUMN D_KDXXSJY.QYMC IS '所属企业名称';
COMMENT ON COLUMN D_KDXXSJY.LKLB IS '粮库类别';
COMMENT ON COLUMN D_KDXXSJY.JCRQ IS '建成日期';
COMMENT ON COLUMN D_KDXXSJY.SJCR IS '设计仓容';
COMMENT ON COLUMN D_KDXXSJY.KDYXCR IS '有效仓容';
COMMENT ON COLUMN D_KDXXSJY.XZQHMC IS '行政区划名称';
COMMENT ON COLUMN D_KDXXSJY.XZQHDM IS '行政区划代码';
COMMENT ON COLUMN D_KDXXSJY.CFS IS '仓房数量';
COMMENT ON COLUMN D_KDXXSJY.YZKQS IS '油脂库区数';
COMMENT ON COLUMN D_KDXXSJY.YGSL IS '油罐数量';
COMMENT ON COLUMN D_KDXXSJY.YXGR IS '有效罐容';
COMMENT ON COLUMN D_KDXXSJY.KDMJ IS '库点面积';
COMMENT ON COLUMN D_KDXXSJY.KDDH IS '库点电话';
COMMENT ON COLUMN D_KDXXSJY.KDDZ IS '库点地址';
COMMENT ON COLUMN D_KDXXSJY.KDCZ IS '库点传真';
COMMENT ON COLUMN D_KDXXSJY.KDYB IS '库点邮编';
COMMENT ON COLUMN D_KDXXSJY.KDJD IS '库点经度';
COMMENT ON COLUMN D_KDXXSJY.KDWD IS '库点维度';
COMMENT ON COLUMN D_KDXXSJY.JLGLLB IS '紧邻公路类别（T/F）';
COMMENT ON COLUMN D_KDXXSJY.JLGLJL IS '紧邻公路距离';
COMMENT ON COLUMN D_KDXXSJY.SFFHWRY IS '是否符合污染源';
COMMENT ON COLUMN D_KDXXSJY.YWXFSY IS '有无消防水源';
COMMENT ON COLUMN D_KDXXSJY.YWXFSS IS '有无消防设施';
COMMENT ON COLUMN D_KDXXSJY.YWJHYS IS '有无检化验室';
COMMENT ON COLUMN D_KDXXSJY.JCCSB_QCH IS '汽车衡';
COMMENT ON COLUMN D_KDXXSJY.FHBZNX IS '防洪标准年限';
COMMENT ON COLUMN D_KDXXSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_KDXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_KDXXSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_KDXXSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_KDXXSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_KDXXSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_KDXXSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_KDXXSJY.REMARK IS '备注';
COMMENT ON TABLE D_KDXXSJY IS '库点基础信息';

-- ----------------------------
-- Records of D_KDXXSJY
-- ----------------------------
INSERT INTO D_KDXXSJY VALUES ('string001', 'string1', NULL, NULL, 'string', 'string', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'string', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-25 20:41:05.903249', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-25 20:52:38.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_RYXXSJY
-- ----------------------------
DROP TABLE D_RYXXSJY;
CREATE TABLE D_RYXXSJY (
  RYBH VARCHAR2(30 BYTE) NOT NULL ,
  RYXM VARCHAR2(20 BYTE) ,
  KDDM VARCHAR2(30 BYTE) ,
  SFZH VARCHAR2(18 BYTE) ,
  XB VARCHAR2(2 BYTE) ,
  JG VARCHAR2(64 BYTE) ,
  MZ NUMBER(10,3) ,
  CSSJ NUMBER(10,3) ,
  CJGZSJ DATE ,
  WHCD VARCHAR2(20 BYTE) ,
  XXZY VARCHAR2(20 BYTE) ,
  ZZMM VARCHAR2(20 BYTE) ,
  ZWDM VARCHAR2(1 BYTE) ,
  BMDM VARCHAR2(6 BYTE) ,
  BMBDM VARCHAR2(6 BYTE) ,
  BMZDM VARCHAR2(6 BYTE) ,
  ZGQKDM VARCHAR2(2 BYTE) ,
  GWDM VARCHAR2(2 BYTE) ,
  JSZCDM VARCHAR2(2 BYTE) ,
  JSZCMC VARCHAR2(30 BYTE) ,
  LXDH VARCHAR2(30 BYTE) ,
  JBZS VARCHAR2(200 BYTE) ,
  FZDW VARCHAR2(120 BYTE) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);

-- ----------------------------
-- Records of D_RYXXSJY
-- ----------------------------
INSERT INTO D_RYXXSJY VALUES ('string001001', '1111111111', 'string001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-26 19:01:25.821360', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-26 19:07:38.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_SBXXSJY
-- ----------------------------
DROP TABLE D_SBXXSJY;
CREATE TABLE D_SBXXSJY (
  SBBH VARCHAR2(30 BYTE) NOT NULL ,
  SBYQMC VARCHAR2(30 BYTE) ,
  KDDM VARCHAR2(30 BYTE) ,
  SBGGXH VARCHAR2(50 BYTE) ,
  SBMS VARCHAR2(50 BYTE) ,
  SBZT VARCHAR2(10 BYTE) ,
  SBFL VARCHAR2(30 BYTE) ,
  SCCJ VARCHAR2(50 BYTE) ,
  CGJG NUMBER(10) ,
  SBGLZ VARCHAR2(50 BYTE) ,
  EDGZSJ NUMBER(10) ,
  DCGZSJ NUMBER(10) ,
  CGSJ DATE ,
  YJJDRQ DATE ,
  LJGZSJ NUMBER(10) ,
  SYSM NUMBER(10) ,
  YJBFRQ DATE ,
  SBZP VARCHAR2(200 BYTE) ,
  DJR VARCHAR2(50 BYTE) ,
  WHYY VARCHAR2(200 BYTE) ,
  WHSJ DATE ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_SBXXSJY.SBBH IS '设备编号';
COMMENT ON COLUMN D_SBXXSJY.SBYQMC IS '设备仪器名称';
COMMENT ON COLUMN D_SBXXSJY.KDDM IS '库点编号';
COMMENT ON COLUMN D_SBXXSJY.SBGGXH IS '设备规格型号';
COMMENT ON COLUMN D_SBXXSJY.SBMS IS '设备描述';
COMMENT ON COLUMN D_SBXXSJY.SBZT IS '设备状态';
COMMENT ON COLUMN D_SBXXSJY.SBFL IS '设备分类';
COMMENT ON COLUMN D_SBXXSJY.SCCJ IS '生产厂家';
COMMENT ON COLUMN D_SBXXSJY.CGJG IS '采购价格';
COMMENT ON COLUMN D_SBXXSJY.SBGLZ IS '设备管理者';
COMMENT ON COLUMN D_SBXXSJY.EDGZSJ IS '额定工作时间(小时)';
COMMENT ON COLUMN D_SBXXSJY.DCGZSJ IS '单次工作时间(小时)';
COMMENT ON COLUMN D_SBXXSJY.CGSJ IS '采购日期';
COMMENT ON COLUMN D_SBXXSJY.YJJDRQ IS '预计检定日期';
COMMENT ON COLUMN D_SBXXSJY.LJGZSJ IS '累计工作时间';
COMMENT ON COLUMN D_SBXXSJY.SYSM IS '使用寿命';
COMMENT ON COLUMN D_SBXXSJY.YJBFRQ IS '预计报废日';
COMMENT ON COLUMN D_SBXXSJY.SBZP IS '设备照片';
COMMENT ON COLUMN D_SBXXSJY.DJR IS '登记人';
COMMENT ON COLUMN D_SBXXSJY.WHYY IS '维护原因';
COMMENT ON COLUMN D_SBXXSJY.WHSJ IS '维护时间';
COMMENT ON COLUMN D_SBXXSJY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN D_SBXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_SBXXSJY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN D_SBXXSJY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN D_SBXXSJY.REFRESHER IS '更新人';
COMMENT ON COLUMN D_SBXXSJY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN D_SBXXSJY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN D_SBXXSJY.REMARK IS '备注';

-- ----------------------------
-- Records of D_SBXXSJY
-- ----------------------------
INSERT INTO D_SBXXSJY VALUES ('string001001', '2123412', 'string001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, TO_TIMESTAMP('2019-07-28 13:54:30.385840', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-28 13:56:50.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for D_YGXXSJY
-- ----------------------------
DROP TABLE D_YGXXSJY;
CREATE TABLE D_YGXXSJY (
  YGBH VARCHAR2(30 BYTE) NOT NULL ,
  YGMC VARCHAR2(20 BYTE) ,
  KDDM VARCHAR2(30 BYTE) ,
  SJGR NUMBER(18,3) ,
  SJGR01 NUMBER(18,3) ,
  YGZJ NUMBER(10,3) ,
  YGGD NUMBER(10,3) ,
  ZYGD NUMBER(10,3) ,
  SJND DATE ,
  YGJD VARCHAR2(20 BYTE) ,
  YGWD VARCHAR2(20 BYTE) ,
  YGZT VARCHAR2(1 BYTE) ,
  YGSYZT VARCHAR2(1 BYTE) ,
  YGLX VARCHAR2(2 BYTE) ,
  YGDMJ NUMBER(10,3) ,
  YGNZJ NUMBER(10,3) ,
  YGCYKGD NUMBER(10,3) ,
  YGJCKGD NUMBER(10,3) ,
  YGPMT VARCHAR2(120 BYTE) ,
  YGKQT VARCHAR2(120 BYTE) ,
  STATUS NUMBER DEFAULT ('1') ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN D_YGXXSJY.YGBH IS '油罐编号';
COMMENT ON COLUMN D_YGXXSJY.YGMC IS '油罐名称';
COMMENT ON COLUMN D_YGXXSJY.KDDM IS '库点编号';
COMMENT ON COLUMN D_YGXXSJY.SJGR IS '设计罐容';
COMMENT ON COLUMN D_YGXXSJY.SJGR01 IS '实际罐容';
COMMENT ON COLUMN D_YGXXSJY.YGZJ IS '油罐直径';
COMMENT ON COLUMN D_YGXXSJY.YGGD IS '油罐高度';
COMMENT ON COLUMN D_YGXXSJY.ZYGD IS '装油高度';
COMMENT ON COLUMN D_YGXXSJY.SJND IS '设计年代';
COMMENT ON COLUMN D_YGXXSJY.YGJD IS '油罐精度';
COMMENT ON COLUMN D_YGXXSJY.YGWD IS '油罐维度';
COMMENT ON COLUMN D_YGXXSJY.YGZT IS '油罐状态';
COMMENT ON COLUMN D_YGXXSJY.YGSYZT IS '油罐使用状态';
COMMENT ON COLUMN D_YGXXSJY.YGLX IS '油罐类型';
COMMENT ON COLUMN D_YGXXSJY.YGDMJ IS '油罐底面积';
COMMENT ON COLUMN D_YGXXSJY.YGNZJ IS '油罐内直径';
COMMENT ON COLUMN D_YGXXSJY.YGCYKGD IS '油罐出油口高度';
COMMENT ON COLUMN D_YGXXSJY.YGJCKGD IS '油罐检查口高度';
COMMENT ON COLUMN D_YGXXSJY.YGPMT IS '油罐平面图';
COMMENT ON COLUMN D_YGXXSJY.YGKQT IS '油罐库区图';
COMMENT ON COLUMN D_YGXXSJY.STATUS IS '状态';
COMMENT ON COLUMN D_YGXXSJY.CREATOR IS '创建人';
COMMENT ON COLUMN D_YGXXSJY.CREATOR_CODE IS '创建编号';
COMMENT ON COLUMN D_YGXXSJY.CREATE_DATE IS '创建日期';
COMMENT ON COLUMN D_YGXXSJY.REFRESHER IS '刷新人';
COMMENT ON COLUMN D_YGXXSJY.REFRESHER_CODE IS '刷新人编号';
COMMENT ON COLUMN D_YGXXSJY.REFRESH_TIME IS '刷新时间';
COMMENT ON COLUMN D_YGXXSJY.REMARK IS '备注';
COMMENT ON TABLE D_YGXXSJY IS '油罐信息表';

-- ----------------------------
-- Records of D_YGXXSJY
-- ----------------------------
INSERT INTO D_YGXXSJY VALUES ('string001001', 'ccccccc', 'string001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, TO_TIMESTAMP('2019-07-26 10:58:23.498206', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, TO_TIMESTAMP('2019-07-26 11:04:55.000000', 'SYYYY-MM-DD HH24:MI:SS:FF6'), NULL);

-- ----------------------------
-- Table structure for TZ_SLQY
-- ----------------------------
DROP TABLE TZ_SLQY;
CREATE TABLE TZ_SLQY (
  ID NUMBER(18) NOT NULL ,
  TYSHXYDM VARCHAR2(18 BYTE) ,
  ZZJGDM VARCHAR2(9 BYTE) ,
  QYMC VARCHAR2(128 BYTE) ,
  QYLX VARCHAR2(2 BYTE) ,
  DWDM VARCHAR2(11 BYTE) ,
  QYJJLX VARCHAR2(32 BYTE) ,
  QYXZ VARCHAR2(32 BYTE) ,
  DJZCLX VARCHAR2(32 BYTE) ,
  GSDJZCH VARCHAR2(32 BYTE) ,
  FDDBR VARCHAR2(20 BYTE) ,
  BGDH VARCHAR2(20 BYTE) ,
  FRSJH VARCHAR2(20 BYTE) ,
  QYDZYX VARCHAR2(20 BYTE) ,
  ZCZB NUMBER(16,2) ,
  QYCYRYS NUMBER(15) ,
  ZJYSZCRS NUMBER(15) ,
  BGYRS NUMBER(15) ,
  JHYYRS NUMBER(15) ,
  YZYZGZSRS NUMBER(15) ,
  QYCZHM VARCHAR2(30 BYTE) ,
  QYTXDZ VARCHAR2(128 BYTE) ,
  QYYB VARCHAR2(6 BYTE) ,
  QYZYYW VARCHAR2(128 BYTE) ,
  QYZCSJ DATE ,
  ZZXLYSRY NUMBER(15) ,
  QYSCLSZYPZ VARCHAR2(6 BYTE) ,
  QYLSGX VARCHAR2(128 BYTE) ,
  
  QYYJJB VARCHAR2(4 BYTE) ,	-- 新加的字段
  QYJD VARCHAR2(20 BYTE) ,-- 新加的字段
  QYWD VARCHAR2(20 BYTE) ,-- 新加的字段
  QYSZQY VARCHAR2(20 BYTE) ,-- 新加的字段
  
  STATUS NUMBER DEFAULT ('1')  ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN TZ_SLQY.ID IS 'id';
COMMENT ON COLUMN TZ_SLQY.TYSHXYDM IS '统一社会信用代码';
COMMENT ON COLUMN TZ_SLQY.ZZJGDM IS '组织机构代码';
COMMENT ON COLUMN TZ_SLQY.QYMC IS '企业名称';
COMMENT ON COLUMN TZ_SLQY.QYLX IS '企业类型';
COMMENT ON COLUMN TZ_SLQY.DWDM IS '单位代码';
COMMENT ON COLUMN TZ_SLQY.QYJJLX IS '企业经济类型';
COMMENT ON COLUMN TZ_SLQY.QYXZ IS '企业性质';
COMMENT ON COLUMN TZ_SLQY.DJZCLX IS '登记注册类型';
COMMENT ON COLUMN TZ_SLQY.GSDJZCH IS '工商登记注册号';
COMMENT ON COLUMN TZ_SLQY.FDDBR IS '法定代表人';
COMMENT ON COLUMN TZ_SLQY.BGDH IS '办公电话';
COMMENT ON COLUMN TZ_SLQY.FRSJH IS '法人联系方式';
COMMENT ON COLUMN TZ_SLQY.QYDZYX IS '企业电子邮箱';
COMMENT ON COLUMN TZ_SLQY.ZCZB IS '注册资本';
COMMENT ON COLUMN TZ_SLQY.QYCYRYS IS '从业人员数';
COMMENT ON COLUMN TZ_SLQY.ZJYSZCRS IS '中级以上职称人数';
COMMENT ON COLUMN TZ_SLQY.BGYRS IS '保管员人数';
COMMENT ON COLUMN TZ_SLQY.JHYYRS IS '检化验员人数';
COMMENT ON COLUMN TZ_SLQY.YZYZGZSRS IS '有职业资格证书人数';
COMMENT ON COLUMN TZ_SLQY.QYCZHM IS '企业传真';
COMMENT ON COLUMN TZ_SLQY.QYTXDZ IS '企业通讯地址';
COMMENT ON COLUMN TZ_SLQY.QYYB IS '企业邮编';
COMMENT ON COLUMN TZ_SLQY.QYZYYW IS '企业主营业务';
COMMENT ON COLUMN TZ_SLQY.QYZCSJ IS '企业注册时间';
COMMENT ON COLUMN TZ_SLQY.ZZXLYSRY IS '中专学历以上人员';
COMMENT ON COLUMN TZ_SLQY.QYSCLSZYPZ IS '企业收储粮食主要品种';
COMMENT ON COLUMN TZ_SLQY.QYLSGX IS '企业隶属关系';
COMMENT ON COLUMN TZ_SLQY.QYYJJB IS '企业应急级别';
COMMENT ON COLUMN TZ_SLQY.QYJD IS '企业经度';
COMMENT ON COLUMN TZ_SLQY.QYWD IS '企业纬度';
COMMENT ON COLUMN TZ_SLQY.QYSZQY IS '企业所属区域';
COMMENT ON COLUMN TZ_SLQY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TZ_SLQY.CREATOR IS '创建人';
COMMENT ON COLUMN TZ_SLQY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TZ_SLQY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TZ_SLQY.REFRESHER IS '更新人';
COMMENT ON COLUMN TZ_SLQY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TZ_SLQY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TZ_SLQY.REMARK IS '备注';
COMMENT ON TABLE TZ_SLQY IS '涉粮企业';

-- ----------------------------
-- 新建
-- ----------------------------
DROP TABLE TZ_YJQY;
CREATE TABLE TZ_YJQY (	-- 新加的数据表
  ID NUMBER(18) NOT NULL ,
  QYLXMC VARCHAR2(30 BYTE) ,
  RJGNL_MF NUMBER(10) ,
  RJGNL_DM NUMBER(10) ,
  RJGNL_SYY NUMBER(10) ,
  RJGNL_QT NUMBER(10) ,
  FSQXS NUMBER(5) ,
  FSGYWDSL NUMBER(10) ,
  RPSNL NUMBER(10) ,
  RYSNL NUMBER(10) ,
  YSCLSL NUMBER(5) ,
  STATUS NUMBER DEFAULT ('1')  ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP  ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN TZ_YJQY.ID IS '涉粮企业id';
COMMENT ON COLUMN TZ_YJQY.QYLXMC IS '企业类型名称';
COMMENT ON COLUMN TZ_YJQY.RJGNL_MF IS '日加工能力-面粉';
COMMENT ON COLUMN TZ_YJQY.RJGNL_DM IS '日加工能力-大米';
COMMENT ON COLUMN TZ_YJQY.RJGNL_SYY IS '日加工能力-食用油';
COMMENT ON COLUMN TZ_YJQY.RJGNL_QT IS '日加工能力-其他';
COMMENT ON COLUMN TZ_YJQY.FSQXS IS '辐射旗县数（个）';
COMMENT ON COLUMN TZ_YJQY.FSGYWDSL IS '辐射供应网点数量（个）';
COMMENT ON COLUMN TZ_YJQY.RPSNL IS '日配送能力（吨）';
COMMENT ON COLUMN TZ_YJQY.RYSNL IS '日运输能力（吨）';
COMMENT ON COLUMN TZ_YJQY.YSCLSL IS '运输车辆数量（台）';
COMMENT ON COLUMN TZ_YJQY.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TZ_YJQY.CREATOR IS '创建人';
COMMENT ON COLUMN TZ_YJQY.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TZ_YJQY.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TZ_YJQY.REFRESHER IS '更新人';
COMMENT ON COLUMN TZ_YJQY.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TZ_YJQY.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TZ_YJQY.REMARK IS '备注';

-- ----------------------------
-- Table structure for TZ_QYJG
-- ----------------------------
DROP TABLE TZ_QYJG;
CREATE TABLE TZ_QYJG (	-- 新加的数据表
  ID NUMBER(18) NOT NULL ,
  TYSHXYDM VARCHAR2(18 BYTE) ,
  QYJGDM VARCHAR2(18 BYTE) ,
  STATUS NUMBER DEFAULT ('1')   ,
  CREATOR VARCHAR2(32 BYTE) ,
  CREATOR_CODE VARCHAR2(32 BYTE) ,
  CREATE_DATE TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP   ,
  REFRESHER VARCHAR2(32 BYTE) ,
  REFRESHER_CODE VARCHAR2(32 BYTE) ,
  REFRESH_TIME TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP   ,
  REMARK VARCHAR2(1000 BYTE) 
);
COMMENT ON COLUMN TZ_QYJG.ID IS '企业机构id';
COMMENT ON COLUMN TZ_QYJG.TYSHXYDM IS '企业统一信用代码';
COMMENT ON COLUMN TZ_QYJG.QYJGDM IS '企业机构代码';
COMMENT ON COLUMN TZ_QYJG.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TZ_QYJG.CREATOR IS '创建人';
COMMENT ON COLUMN TZ_QYJG.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TZ_QYJG.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TZ_QYJG.REFRESHER IS '更新人';
COMMENT ON COLUMN TZ_QYJG.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TZ_QYJG.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TZ_QYJG.REMARK IS '备注';

-- ----------------------------
-- Primary Key structure for table D_AJXXSJY
-- ----------------------------
ALTER TABLE D_AJXXSJY ADD CONSTRAINT SYS_C0037555 PRIMARY KEY (AJBH);

-- ----------------------------
-- Primary Key structure for table D_CFXXSJY
-- ----------------------------
ALTER TABLE D_CFXXSJY ADD CONSTRAINT SYS_C0037557 PRIMARY KEY (CFBH);

-- ----------------------------
-- Primary Key structure for table D_CFZTSJY
-- ----------------------------
ALTER TABLE D_CFZTSJY ADD CONSTRAINT SYS_C0037556 PRIMARY KEY (CFBH);

-- ----------------------------
-- Checks structure for table D_HWXXSJY
-- ----------------------------
ALTER TABLE D_HWXXSJY ADD CONSTRAINT SYS_C0037881 CHECK (HWBH IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table D_KDXXSJY
-- ----------------------------
ALTER TABLE D_KDXXSJY ADD CONSTRAINT SYS_C0037558 PRIMARY KEY (KDDM);

-- ----------------------------
-- Primary Key structure for table D_RYXXSJY
-- ----------------------------
ALTER TABLE D_RYXXSJY ADD CONSTRAINT SYS_C0037884 PRIMARY KEY (RYBH);

-- ----------------------------
-- Primary Key structure for table D_SBXXSJY
-- ----------------------------
ALTER TABLE D_SBXXSJY ADD CONSTRAINT SYS_C0038191 PRIMARY KEY (SBBH);

-- ----------------------------
-- Primary Key structure for table D_YGXXSJY
-- ----------------------------
ALTER TABLE D_YGXXSJY ADD CONSTRAINT SYS_C0037882 PRIMARY KEY (YGBH);

-- ----------------------------
-- Checks structure for table TZ_SLQY
-- ----------------------------
ALTER TABLE TZ_SLQY ADD CONSTRAINT SYS_C0038246 CHECK (ID IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table TZ_YJQY
-- ----------------------------
ALTER TABLE TZ_YJQY ADD CONSTRAINT SYS_C0038245 PRIMARY KEY (ID);

-- ----------------------------
-- Checks structure for table TZ_YJQY
-- ----------------------------
ALTER TABLE TZ_YJQY ADD CONSTRAINT SYS_C0038244 CHECK (ID IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;



-- ----------------------------
-- Table structure for TY_CRKJSXX
-- ----------------------------
DROP TABLE TY_CRKJSXX;
CREATE TABLE TY_CRKJSXX (
JSID VARCHAR2(32 BYTE) NOT NULL ,
JSDH VARCHAR2(16 BYTE) NOT NULL ,
JSSJ DATE NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
KHDM VARCHAR2(18 BYTE) NULL ,
KHMC VARCHAR2(50 BYTE) NULL ,
KHSSQYDM VARCHAR2(18 BYTE) NULL ,
KHSSYQMC VARCHAR2(50 BYTE) NULL ,
KHLXDH VARCHAR2(50 BYTE) NULL ,
KHSFZH VARCHAR2(50 BYTE) NULL ,
KHYHZH VARCHAR2(50 BYTE) NULL ,
KHKHYH VARCHAR2(50 BYTE) NULL ,
HWBM VARCHAR2(30 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
YSCCH VARCHAR2(20 BYTE) NULL ,
CZMZ NUMBER(9,2) NULL ,
CZPZ NUMBER(9,2) NULL ,
CZJZ NUMBER(9,2) NULL ,
KZL NUMBER(9,2) NULL ,
KDJ NUMBER(9,2) NULL ,
DJJE NUMBER(9,2) NULL ,
ZZJSZL NUMBER(9,2) NULL ,
ZZJSDJ NUMBER(9,2) NULL ,
ZZJSJE NUMBER(9,2) NULL ,
CRKID VARCHAR2(32 BYTE) NULL ,
CRKDH VARCHAR2(16 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_CRKJSXX IS '出入库结算信息';
COMMENT ON COLUMN TY_CRKJSXX.JSID IS '结算ID JS20190802000001';
COMMENT ON COLUMN TY_CRKJSXX.JSDH IS '结算单号 190802000001';
COMMENT ON COLUMN TY_CRKJSXX.JSSJ IS '结算时间';
COMMENT ON COLUMN TY_CRKJSXX.PZBM IS '品种编码';
COMMENT ON COLUMN TY_CRKJSXX.PZMC IS '品种名称 ';
COMMENT ON COLUMN TY_CRKJSXX.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_CRKJSXX.LSDJMC IS '粮食等级名称';
COMMENT ON COLUMN TY_CRKJSXX.KHDM IS '客户代码 ';
COMMENT ON COLUMN TY_CRKJSXX.KHMC IS '客户名称';
COMMENT ON COLUMN TY_CRKJSXX.KHSSQYDM IS '客户所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_CRKJSXX.KHSSYQMC IS '客户所属企业名称';
COMMENT ON COLUMN TY_CRKJSXX.KHLXDH IS '客户联系电话';
COMMENT ON COLUMN TY_CRKJSXX.KHSFZH IS '客户身份证号 ';
COMMENT ON COLUMN TY_CRKJSXX.KHYHZH IS '客户银行账户';
COMMENT ON COLUMN TY_CRKJSXX.KHKHYH IS '客户开户银行';
COMMENT ON COLUMN TY_CRKJSXX.HWBM IS '货位编号';
COMMENT ON COLUMN TY_CRKJSXX.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_CRKJSXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_CRKJSXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_CRKJSXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_CRKJSXX.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_CRKJSXX.SSYQMC IS '所属企业名称  ';
COMMENT ON COLUMN TY_CRKJSXX.YSCCH IS '运输车船号';
COMMENT ON COLUMN TY_CRKJSXX.CZMZ IS '称重毛总（kg）';
COMMENT ON COLUMN TY_CRKJSXX.CZPZ IS '称重皮总（kg）';
COMMENT ON COLUMN TY_CRKJSXX.CZJZ IS '称重净重（kg）';
COMMENT ON COLUMN TY_CRKJSXX.KZL IS '扣重量（kg';
COMMENT ON COLUMN TY_CRKJSXX.KDJ IS '扣单价（元）';
COMMENT ON COLUMN TY_CRKJSXX.DJJE IS '单价金额（元）';
COMMENT ON COLUMN TY_CRKJSXX.ZZJSZL IS '最终结算重量（kg）';
COMMENT ON COLUMN TY_CRKJSXX.ZZJSDJ IS '最终结算单价（元）';
COMMENT ON COLUMN TY_CRKJSXX.ZZJSJE IS '最终结算金额（元）';
COMMENT ON COLUMN TY_CRKJSXX.CRKID IS '出入库ID CR20190802000001';
COMMENT ON COLUMN TY_CRKJSXX.CRKDH IS '出入库单号 190802000001';
COMMENT ON COLUMN TY_CRKJSXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_CRKJSXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_CRKJSXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_CRKJSXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_CRKJSXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_CRKJSXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_CRKJSXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_CRKJSXX.REMARK IS '备注';
-- ----------------------------
-- Records of TY_CRKJSXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_CRKJSXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_CRKJSXX
-- ----------------------------
ALTER TABLE TY_CRKJSXX ADD CHECK (JSID IS NOT NULL);
ALTER TABLE TY_CRKJSXX ADD CHECK (JSDH IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_CRKJSXX
-- ----------------------------
ALTER TABLE TY_CRKJSXX ADD PRIMARY KEY (JSID);


-- ----------------------------
-- Table structure for TY_CRKXX
-- ----------------------------
DROP TABLE TY_CRKXX;
CREATE TABLE TY_CRKXX (
CRKID VARCHAR2(32 BYTE) NOT NULL ,
CRKDH VARCHAR2(16 BYTE) NOT NULL ,
CRKLX VARCHAR2(2 BYTE) NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
SHND VARCHAR2(4 BYTE) NULL ,
LSGB VARCHAR2(20 BYTE) NULL ,
LSCD VARCHAR2(20 BYTE) NULL ,
QYDBH VARCHAR2(30 BYTE) NULL ,
YPSLDW NUMBER(9,2) NULL ,
DBSLDW NUMBER(9,2) NULL ,
QYDD VARCHAR2(50 BYTE) NULL ,
QYRBM VARCHAR2(30 BYTE) NULL ,
QYRMC VARCHAR2(50 BYTE) NULL ,
JYRQ DATE NULL ,
JYYJ VARCHAR2(2 BYTE) NULL ,
JYJG VARCHAR2(500 BYTE) NULL ,
CHECK_REMARK VARCHAR2(1024 BYTE) NULL ,
CZMZ NUMBER(9,2) NULL ,
MZJBYBM VARCHAR2(30 BYTE) NULL ,
MZJBYMC VARCHAR2(50 BYTE) NULL ,
MZCZSJ DATE NULL ,
CZPZ NUMBER(9,2) NULL ,
PZJBYBM VARCHAR2(30 BYTE) NULL ,
PZJBYMC VARCHAR2(50 BYTE) NULL ,
PZCZSJ DATE NULL ,
CZJZ NUMBER(9,2) NULL ,
XCKZL NUMBER(9,2) NULL ,
HGKZL NUMBER(9,2) NULL ,
ZZJSZL NUMBER(9,2) NULL ,
ZZJSJE NUMBER(9,2) NULL ,
CYRDM VARCHAR2(18 BYTE) NULL ,
CYRMC VARCHAR2(50 BYTE) NULL ,
CYRDH VARCHAR2(50 BYTE) NULL ,
CYRSFZH VARCHAR2(50 BYTE) NULL ,
CYRDZ VARCHAR2(128 BYTE) NULL ,
KHDM VARCHAR2(18 BYTE) NULL ,
KHMC VARCHAR2(50 BYTE) NULL ,
KHSSQYDM VARCHAR2(18 BYTE) NULL ,
KHSSYQMC VARCHAR2(50 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
YSFS VARCHAR2(10 BYTE) NULL ,
YSCCH VARCHAR2(20 BYTE) NULL ,
CRKDJSJ DATE NULL ,
CMDJSJ DATE NULL ,
MGZSRXM VARCHAR2(30 BYTE) NULL ,
SSTZDID VARCHAR2(32 BYTE) NULL ,
SSTZDH VARCHAR2(16 BYTE) NULL ,
SSJHXXID VARCHAR2(32 BYTE) NULL ,
SSJHH VARCHAR2(32 BYTE) NULL ,
SSHTXXID VARCHAR2(32 BYTE) NULL ,
SSHTBM VARCHAR2(30 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_CRKXX IS '出入库信息';
COMMENT ON COLUMN TY_CRKXX.CRKID IS '出入库ID CR20190802000001';
COMMENT ON COLUMN TY_CRKXX.CRKDH IS '出入库单号 190802000001';
COMMENT ON COLUMN TY_CRKXX.CRKLX IS '出入库类型 （01：出库；02：入库）';
COMMENT ON COLUMN TY_CRKXX.PZBM IS '品种编码';
COMMENT ON COLUMN TY_CRKXX.PZMC IS '品种名称';
COMMENT ON COLUMN TY_CRKXX.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_CRKXX.LSDJMC IS '粮食等级名称';
COMMENT ON COLUMN TY_CRKXX.SHND IS '收获年度';
COMMENT ON COLUMN TY_CRKXX.LSGB IS '粮食国别（）';
COMMENT ON COLUMN TY_CRKXX.LSCD IS '粮食产地（）';
COMMENT ON COLUMN TY_CRKXX.QYDBH IS '样品单编号';
COMMENT ON COLUMN TY_CRKXX.YPSLDW IS '样品数量单位（kg）';
COMMENT ON COLUMN TY_CRKXX.DBSLDW IS '代表数量单位（kg';
COMMENT ON COLUMN TY_CRKXX.QYDD IS '签样地点';
COMMENT ON COLUMN TY_CRKXX.QYRBM IS '签样人编码 ';
COMMENT ON COLUMN TY_CRKXX.QYRMC IS '签样人名称';
COMMENT ON COLUMN TY_CRKXX.JYRQ IS '检验时间';
COMMENT ON COLUMN TY_CRKXX.JYYJ IS '检验依据（01：国标；00：其他）';
COMMENT ON COLUMN TY_CRKXX.JYJG IS '检验结果  ';
COMMENT ON COLUMN TY_CRKXX.CHECK_REMARK IS '检验备注	';
COMMENT ON COLUMN TY_CRKXX.CZMZ IS '称重毛总（kg）';
COMMENT ON COLUMN TY_CRKXX.MZJBYBM IS '毛重监磅员编码';
COMMENT ON COLUMN TY_CRKXX.MZJBYMC IS '毛重监磅员名称';
COMMENT ON COLUMN TY_CRKXX.MZCZSJ IS '毛重称重时间';
COMMENT ON COLUMN TY_CRKXX.CZPZ IS '称重皮总（kg）';
COMMENT ON COLUMN TY_CRKXX.PZJBYBM IS '皮重监磅员编码 ';
COMMENT ON COLUMN TY_CRKXX.PZJBYMC IS '皮重监磅员名称';
COMMENT ON COLUMN TY_CRKXX.PZCZSJ IS '皮重称重时间';
COMMENT ON COLUMN TY_CRKXX.CZJZ IS '称重净重（kg';
COMMENT ON COLUMN TY_CRKXX.XCKZL IS '现场扣重量（kg）';
COMMENT ON COLUMN TY_CRKXX.HGKZL IS '烘干扣重量（kg）';
COMMENT ON COLUMN TY_CRKXX.ZZJSZL IS '最终结算重量（kg）';
COMMENT ON COLUMN TY_CRKXX.ZZJSJE IS '最终结算金额（元）';
COMMENT ON COLUMN TY_CRKXX.CYRDM IS '承运人代码';
COMMENT ON COLUMN TY_CRKXX.CYRMC IS '承运人名称';
COMMENT ON COLUMN TY_CRKXX.CYRDH IS '承运人电话';
COMMENT ON COLUMN TY_CRKXX.CYRSFZH IS '承运人身份证号';
COMMENT ON COLUMN TY_CRKXX.CYRDZ IS '承运人地址';
COMMENT ON COLUMN TY_CRKXX.KHDM IS '客户代码';
COMMENT ON COLUMN TY_CRKXX.KHMC IS '客户名称';
COMMENT ON COLUMN TY_CRKXX.KHSSQYDM IS '客户所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_CRKXX.KHSSYQMC IS '客户所属企业名称';
COMMENT ON COLUMN TY_CRKXX.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_CRKXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_CRKXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_CRKXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_CRKXX.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_CRKXX.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_CRKXX.YSFS IS '运输方式';
COMMENT ON COLUMN TY_CRKXX.YSCCH IS '运输车船号  ';
COMMENT ON COLUMN TY_CRKXX.CRKDJSJ IS '登记时间';
COMMENT ON COLUMN TY_CRKXX.CMDJSJ IS '出门登记时间';
COMMENT ON COLUMN TY_CRKXX.MGZSRXM IS '门岗值守人姓名	 ';
COMMENT ON COLUMN TY_CRKXX.SSTZDID IS '所属通知编码 TZ20190802000001';
COMMENT ON COLUMN TY_CRKXX.SSTZDH IS '所属通知单号 190802000001';
COMMENT ON COLUMN TY_CRKXX.SSJHXXID IS ' 所属计划id JH20190802000001 ';
COMMENT ON COLUMN TY_CRKXX.SSJHH IS '所属计划号（计划文号）';
COMMENT ON COLUMN TY_CRKXX.SSHTXXID IS '合同信息id HT20190802000001	';
COMMENT ON COLUMN TY_CRKXX.SSHTBM IS '合同编号';
COMMENT ON COLUMN TY_CRKXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_CRKXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_CRKXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_CRKXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_CRKXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_CRKXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_CRKXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_CRKXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_CRKXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_CRKXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_CRKXX
-- ----------------------------
ALTER TABLE TY_CRKXX ADD CHECK (CRKID IS NOT NULL);
ALTER TABLE TY_CRKXX ADD CHECK (CRKDH IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_CRKXX
-- ----------------------------
ALTER TABLE TY_CRKXX ADD PRIMARY KEY (CRKID);


-- ----------------------------
-- Table structure for TY_HTXX
-- ----------------------------
DROP TABLE TY_HTXX;
CREATE TABLE TY_HTXX (
HTXXID VARCHAR2(32 BYTE) NOT NULL ,
HTBH VARCHAR2(30 BYTE) NULL ,
HTMC VARCHAR2(64 BYTE) NULL ,
JFQYDM VARCHAR2(18 BYTE) NULL ,
JFQYMC VARCHAR2(50 BYTE) NULL ,
JFKDBM VARCHAR2(30 BYTE) NULL ,
JFKDMC VARCHAR2(30 BYTE) NULL ,
JFKHH VARCHAR2(30 BYTE) NULL ,
JFYHZH VARCHAR2(30 BYTE) NULL ,
JFQYR VARCHAR2(50 BYTE) NULL ,
JFLXDH VARCHAR2(50 BYTE) NULL ,
JFQZZT VARCHAR2(2 BYTE) NULL ,
YFQYDM VARCHAR2(18 BYTE) NULL ,
YFQYMC VARCHAR2(50 BYTE) NULL ,
YFKDBM VARCHAR2(30 BYTE) NULL ,
YFKDMC VARCHAR2(30 BYTE) NULL ,
YFKHH VARCHAR2(30 BYTE) NULL ,
YFYHZH VARCHAR2(30 BYTE) NULL ,
YFQYR VARCHAR2(50 BYTE) NULL ,
YFLXDH VARCHAR2(50 BYTE) NULL ,
YFQZZT VARCHAR2(2 BYTE) NULL ,
HTQSSJ DATE NULL ,
HTQSDD VARCHAR2(128 BYTE) NULL ,
HTZJE NUMBER(9,2) NULL ,
HTZSL NUMBER(9,2) NULL ,
HTZDJ NUMBER(9,2) NULL ,
HTBZJE NUMBER(9,2) NULL ,
HTSXKSSJ DATE NULL ,
HTSXJZSJ DATE NULL ,
JHKSSJ DATE NULL ,
JHJSSJ DATE NULL ,
LSPZBM VARCHAR2(8 BYTE) NULL ,
LSPZMC VARCHAR2(30 BYTE) NULL ,
YSFS VARCHAR2(30 BYTE) NULL ,
ZFFS VARCHAR2(30 BYTE) NULL ,
ZYJJFS VARCHAR2(30 BYTE) NULL ,
HTWYZR VARCHAR2(500 BYTE) NULL ,
HTJCTJ VARCHAR2(500 BYTE) NULL ,
HTBZXX VARCHAR2(500 BYTE) NULL ,
LSPZID VARCHAR2(32 BYTE) NULL ,
LSPZHM VARCHAR2(50 BYTE) NULL ,
SPZT VARCHAR2(20 BYTE) NULL ,
ZXZT VARCHAR2(20 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON COLUMN TY_HTXX.HTXXID IS '合同信息id  HT20190802000001';
COMMENT ON COLUMN TY_HTXX.HTBH IS '合同编号';
COMMENT ON COLUMN TY_HTXX.HTMC IS '合同名称';
COMMENT ON COLUMN TY_HTXX.JFQYDM IS '甲方企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_HTXX.JFQYMC IS '甲方企业名称';
COMMENT ON COLUMN TY_HTXX.JFKDBM IS '甲方库点编码';
COMMENT ON COLUMN TY_HTXX.JFKDMC IS '甲方库点名称';
COMMENT ON COLUMN TY_HTXX.JFKHH IS '甲方开户行 ';
COMMENT ON COLUMN TY_HTXX.JFYHZH IS '甲方账号';
COMMENT ON COLUMN TY_HTXX.JFQYR IS '甲方签约人';
COMMENT ON COLUMN TY_HTXX.JFLXDH IS '甲方联系电话';
COMMENT ON COLUMN TY_HTXX.JFQZZT IS '甲方签章状态';
COMMENT ON COLUMN TY_HTXX.YFQYDM IS '乙方企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_HTXX.YFQYMC IS '乙方企业名称';
COMMENT ON COLUMN TY_HTXX.YFKDBM IS '乙方库点编码';
COMMENT ON COLUMN TY_HTXX.YFKDMC IS '乙方库点名称';
COMMENT ON COLUMN TY_HTXX.YFKHH IS '乙方开户行 ';
COMMENT ON COLUMN TY_HTXX.YFYHZH IS '乙方开户账号 ';
COMMENT ON COLUMN TY_HTXX.YFQYR IS '乙方签约人';
COMMENT ON COLUMN TY_HTXX.YFLXDH IS '乙方联系电话';
COMMENT ON COLUMN TY_HTXX.YFQZZT IS '乙方签章状态';
COMMENT ON COLUMN TY_HTXX.HTQSSJ IS '合同签署时间';
COMMENT ON COLUMN TY_HTXX.HTQSDD IS '合同签署地点';
COMMENT ON COLUMN TY_HTXX.HTZJE IS '合同总金额';
COMMENT ON COLUMN TY_HTXX.HTZSL IS '合同在数量';
COMMENT ON COLUMN TY_HTXX.HTZDJ IS '合同总单价';
COMMENT ON COLUMN TY_HTXX.HTBZJE IS '合同保证金额';
COMMENT ON COLUMN TY_HTXX.HTSXKSSJ IS '合同生效时间';
COMMENT ON COLUMN TY_HTXX.HTSXJZSJ IS '合同生效截止时间';
COMMENT ON COLUMN TY_HTXX.JHKSSJ IS '交货开始时间';
COMMENT ON COLUMN TY_HTXX.JHJSSJ IS '交货结束时间';
COMMENT ON COLUMN TY_HTXX.LSPZBM IS '品种编码';
COMMENT ON COLUMN TY_HTXX.LSPZMC IS '品种名称';
COMMENT ON COLUMN TY_HTXX.YSFS IS '运输方式';
COMMENT ON COLUMN TY_HTXX.ZFFS IS '支付方式';
COMMENT ON COLUMN TY_HTXX.ZYJJFS IS '争议解决方案';
COMMENT ON COLUMN TY_HTXX.HTWYZR IS '合同违约责任';
COMMENT ON COLUMN TY_HTXX.HTJCTJ IS '合同解除条件';
COMMENT ON COLUMN TY_HTXX.HTBZXX IS '合同备注信息';
COMMENT ON COLUMN TY_HTXX.LSPZID IS '计划id';
COMMENT ON COLUMN TY_HTXX.LSPZHM IS '计划号码';
COMMENT ON COLUMN TY_HTXX.SPZT IS '审批状态';
COMMENT ON COLUMN TY_HTXX.ZXZT IS '执行状态';
COMMENT ON COLUMN TY_HTXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_HTXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_HTXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_HTXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_HTXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_HTXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_HTXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_HTXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_HTXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_HTXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_HTXX
-- ----------------------------
ALTER TABLE TY_HTXX ADD CHECK (HTXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_HTXX
-- ----------------------------
ALTER TABLE TY_HTXX ADD PRIMARY KEY (HTXXID);


-- ----------------------------
-- Table structure for TY_JHXXMXB
-- ----------------------------
DROP TABLE TY_JHXXMXB;
CREATE TABLE TY_JHXXMXB (
SXH NUMBER NOT NULL ,
JHXXID VARCHAR2(32 BYTE) NOT NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
KCJG NUMBER(18,2) NULL ,
SCNF VARCHAR2(4 BYTE) NULL ,
RKNF VARCHAR2(4 BYTE) NULL ,
JHMXZT VARCHAR2(20 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_JHXXMXB IS '计划信息明细';
COMMENT ON COLUMN TY_JHXXMXB.SXH IS '顺序号';
COMMENT ON COLUMN TY_JHXXMXB.JHXXID IS '计划信息id JH20190802000001';
COMMENT ON COLUMN TY_JHXXMXB.CFBH IS '仓房编号 ';
COMMENT ON COLUMN TY_JHXXMXB.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_JHXXMXB.PZBM IS '品种编码';
COMMENT ON COLUMN TY_JHXXMXB.PZMC IS '品种名称';
COMMENT ON COLUMN TY_JHXXMXB.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_JHXXMXB.LSDJMC IS '粮食等级名称	';
COMMENT ON COLUMN TY_JHXXMXB.KCJG IS '库存价格(元/公斤)';
COMMENT ON COLUMN TY_JHXXMXB.SCNF IS '生产年份	';
COMMENT ON COLUMN TY_JHXXMXB.RKNF IS '入库年份	';
COMMENT ON COLUMN TY_JHXXMXB.JHMXZT IS '计划明细状态';
COMMENT ON COLUMN TY_JHXXMXB.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_JHXXMXB.CREATOR IS '创建人';
COMMENT ON COLUMN TY_JHXXMXB.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_JHXXMXB.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_JHXXMXB.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_JHXXMXB.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_JHXXMXB.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_JHXXMXB.REMARK IS 'b备注';

-- ----------------------------
-- Records of TY_JHXXMXB
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_JHXXMXB
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_JHXXMXB
-- ----------------------------
ALTER TABLE TY_JHXXMXB ADD CHECK (SXH IS NOT NULL);
ALTER TABLE TY_JHXXMXB ADD CHECK (JHXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_JHXXMXB
-- ----------------------------
ALTER TABLE TY_JHXXMXB ADD PRIMARY KEY (JHXXID);


-- ----------------------------
-- Table structure for TY_JHXXZB
-- ----------------------------
DROP TABLE TY_JHXXZB;
CREATE TABLE TY_JHXXZB (
JHXXID VARCHAR2(32 BYTE) NOT NULL ,
JHH VARCHAR2(32 BYTE) NULL ,
JHBT VARCHAR2(50 BYTE) NULL ,
JHMS VARCHAR2(300 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
JHLX VARCHAR2(2 BYTE) NULL ,
LSYQSL NUMBER(9,2) NULL ,
LSNQ VARCHAR2(2 BYTE) NULL ,
LSWCSL NUMBER(9,2) NULL ,
LSJG NUMBER(9,2) NULL ,
JHKSSJ DATE NULL ,
JHJZSJ DATE NULL ,
BZSJ DATE NULL ,
BZRBM VARCHAR2(30 BYTE) NULL ,
BZRMC VARCHAR2(50 BYTE) NULL ,
SHSJ DATE NULL ,
SHRBM VARCHAR2(30 BYTE) NULL ,
SHRMC VARCHAR2(50 BYTE) NULL ,
QFSJ DATE NULL ,
QFRBM VARCHAR2(30 BYTE) NULL ,
QFRMC VARCHAR2(50 BYTE) NULL ,
JHZXZT VARCHAR2(20 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_JHXXZB IS '计划信息主表';
COMMENT ON COLUMN TY_JHXXZB.JHXXID IS '计划信息id JH20190802000001 ';
COMMENT ON COLUMN TY_JHXXZB.JHH IS '计划号（计划文号）';
COMMENT ON COLUMN TY_JHXXZB.JHBT IS '计划标题';
COMMENT ON COLUMN TY_JHXXZB.JHMS IS '计划描述';
COMMENT ON COLUMN TY_JHXXZB.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_JHXXZB.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_JHXXZB.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_JHXXZB.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_JHXXZB.JHLX IS '计划类型(01:轮入；02：轮出;03:移库；04：轮换；05：救灾；09：其他)';
COMMENT ON COLUMN TY_JHXXZB.LSYQSL IS '粮食要求数量（顿';
COMMENT ON COLUMN TY_JHXXZB.LSNQ IS '粮食年期 生产年份';
COMMENT ON COLUMN TY_JHXXZB.LSWCSL IS '粮食完成数量（顿）';
COMMENT ON COLUMN TY_JHXXZB.LSJG IS '粮食价格（元/kg）';
COMMENT ON COLUMN TY_JHXXZB.JHKSSJ IS '计划开始时间';
COMMENT ON COLUMN TY_JHXXZB.JHJZSJ IS '计划截止时间';
COMMENT ON COLUMN TY_JHXXZB.BZSJ IS '编制时间';
COMMENT ON COLUMN TY_JHXXZB.BZRBM IS '编制人编码';
COMMENT ON COLUMN TY_JHXXZB.BZRMC IS '编制人名称';
COMMENT ON COLUMN TY_JHXXZB.SHSJ IS '审核时间';
COMMENT ON COLUMN TY_JHXXZB.SHRBM IS '审核人编码 ';
COMMENT ON COLUMN TY_JHXXZB.SHRMC IS '审核人名称';
COMMENT ON COLUMN TY_JHXXZB.QFSJ IS '签发时间';
COMMENT ON COLUMN TY_JHXXZB.QFRBM IS '签发人编码';
COMMENT ON COLUMN TY_JHXXZB.QFRMC IS '签发人名称';
COMMENT ON COLUMN TY_JHXXZB.JHZXZT IS '计划执行状态 ';
COMMENT ON COLUMN TY_JHXXZB.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_JHXXZB.CREATOR IS '创建人';
COMMENT ON COLUMN TY_JHXXZB.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_JHXXZB.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_JHXXZB.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_JHXXZB.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_JHXXZB.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_JHXXZB.REMARK IS '备注';

-- ----------------------------
-- Records of TY_JHXXZB
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_JHXXZB
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_JHXXZB
-- ----------------------------
ALTER TABLE TY_JHXXZB ADD CHECK (JHXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_JHXXZB
-- ----------------------------
ALTER TABLE TY_JHXXZB ADD PRIMARY KEY (JHXXID);


-- ----------------------------
-- Table structure for TY_LHTZD
-- ----------------------------
DROP TABLE TY_LHTZD;
CREATE TABLE TY_LHTZD (
TZDID VARCHAR2(32 BYTE) NOT NULL ,
TZDH VARCHAR2(16 BYTE) NOT NULL ,
TZDLX VARCHAR2(2 BYTE) NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSYQSL NUMBER(9,2) NULL ,
LSNQ VARCHAR2(2 BYTE) NULL ,
LSWCSL NUMBER(9,2) NULL ,
LSJG NUMBER(9,2) NULL ,
JHKSSJ DATE NULL ,
JHJZSJ DATE NULL ,
KHDM VARCHAR2(18 BYTE) NULL ,
KHMC VARCHAR2(50 BYTE) NULL ,
KHSSQYDM VARCHAR2(18 BYTE) NULL ,
KHSSYQMC VARCHAR2(50 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
SSJHXXID VARCHAR2(32 BYTE) NULL ,
SSJHH VARCHAR2(32 BYTE) NULL ,
SSHTXXID VARCHAR2(32 BYTE) NULL ,
SSHTBM VARCHAR2(30 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_LHTZD IS '出入库通知单';
COMMENT ON COLUMN TY_LHTZD.TZDID IS '通知编码 TZ20190802000001';
COMMENT ON COLUMN TY_LHTZD.TZDH IS '通知单号 190802000001';
COMMENT ON COLUMN TY_LHTZD.TZDLX IS '通知单类型 （01：出库；02：入库）';
COMMENT ON COLUMN TY_LHTZD.PZBM IS '品种编码';
COMMENT ON COLUMN TY_LHTZD.PZMC IS '品种名称';
COMMENT ON COLUMN TY_LHTZD.LSYQSL IS '粮食要求数量（顿';
COMMENT ON COLUMN TY_LHTZD.LSNQ IS '粮食年期 生产年份';
COMMENT ON COLUMN TY_LHTZD.LSWCSL IS '粮食完成数量（顿';
COMMENT ON COLUMN TY_LHTZD.LSJG IS '粮食价格（元/kg）';
COMMENT ON COLUMN TY_LHTZD.JHKSSJ IS '通知计划开始时间';
COMMENT ON COLUMN TY_LHTZD.JHJZSJ IS '通知计划截止时间';
COMMENT ON COLUMN TY_LHTZD.KHDM IS '客户代码 ';
COMMENT ON COLUMN TY_LHTZD.KHMC IS '客户名称';
COMMENT ON COLUMN TY_LHTZD.KHSSQYDM IS '客户所属企业代码 （统一社会信用代码） ';
COMMENT ON COLUMN TY_LHTZD.KHSSYQMC IS '客户所属企业名称';
COMMENT ON COLUMN TY_LHTZD.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_LHTZD.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_LHTZD.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_LHTZD.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_LHTZD.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_LHTZD.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_LHTZD.SSJHXXID IS '所属计划id JH20190802000001 ';
COMMENT ON COLUMN TY_LHTZD.SSJHH IS '所属计划号（计划文号）';
COMMENT ON COLUMN TY_LHTZD.SSHTXXID IS '合同信息id HT20190802000001	';
COMMENT ON COLUMN TY_LHTZD.SSHTBM IS '合同编号（）';
COMMENT ON COLUMN TY_LHTZD.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_LHTZD.CREATOR IS '创建人';
COMMENT ON COLUMN TY_LHTZD.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_LHTZD.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_LHTZD.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_LHTZD.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_LHTZD.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_LHTZD.REMARK IS '备注';

-- ----------------------------
-- Records of TY_LHTZD
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_LHTZD
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_LHTZD
-- ----------------------------
ALTER TABLE TY_LHTZD ADD CHECK (TZDID IS NOT NULL);
ALTER TABLE TY_LHTZD ADD CHECK (TZDH IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_LHTZD
-- ----------------------------
ALTER TABLE TY_LHTZD ADD PRIMARY KEY (TZDID);



-- ----------------------------
-- Table structure for TY_LQMXXX
-- ----------------------------
DROP TABLE TY_LQMXXX;
CREATE TABLE TY_LQMXXX (
SXH NUMBER NOT NULL ,
LQID VARCHAR2(32 BYTE) NOT NULL ,
CJSJ DATE NULL ,
HWBM VARCHAR2(30 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
CWGBM VARCHAR2(20 BYTE) NULL ,
CWDBM VARCHAR2(20 BYTE) NULL ,
CWD_X VARCHAR2(20 BYTE) NULL ,
CWD_Y VARCHAR2(20 BYTE) NULL ,
CWD_Z VARCHAR2(20 BYTE) NULL ,
CFCWZ NUMBER(9,2) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_LQMXXX IS '粮情信息明细';
COMMENT ON COLUMN TY_LQMXXX.SXH IS '顺序号';
COMMENT ON COLUMN TY_LQMXXX.LQID IS '粮情ID LQ20190802000001';
COMMENT ON COLUMN TY_LQMXXX.CJSJ IS '采集时间 ';
COMMENT ON COLUMN TY_LQMXXX.HWBM IS '货位编号';
COMMENT ON COLUMN TY_LQMXXX.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_LQMXXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_LQMXXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_LQMXXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_LQMXXX.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_LQMXXX.SSYQMC IS '所属企业名称 ';
COMMENT ON COLUMN TY_LQMXXX.CWGBM IS '测温杆编号';
COMMENT ON COLUMN TY_LQMXXX.CWDBM IS '测温点编号';
COMMENT ON COLUMN TY_LQMXXX.CWD_X IS '测温点X';
COMMENT ON COLUMN TY_LQMXXX.CWD_Y IS '测温点Y';
COMMENT ON COLUMN TY_LQMXXX.CWD_Z IS '测温点Z';
COMMENT ON COLUMN TY_LQMXXX.CFCWZ IS '仓房测温值';
COMMENT ON COLUMN TY_LQMXXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_LQMXXX.CREATOR IS '创建人 ';
COMMENT ON COLUMN TY_LQMXXX.CREATOR_CODE IS ' 创建人编码  ';
COMMENT ON COLUMN TY_LQMXXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_LQMXXX.REFRESHER IS ' 更新人 ';
COMMENT ON COLUMN TY_LQMXXX.REFRESHER_CODE IS '更新人编码 ';
COMMENT ON COLUMN TY_LQMXXX.REFRESH_TIME IS ' 更新时间 ';
COMMENT ON COLUMN TY_LQMXXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_LQMXXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_LQMXXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_LQMXXX
-- ----------------------------
ALTER TABLE TY_LQMXXX ADD CHECK (SXH IS NOT NULL);
ALTER TABLE TY_LQMXXX ADD CHECK (LQID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_LQMXXX
-- ----------------------------
ALTER TABLE TY_LQMXXX ADD PRIMARY KEY (LQID, SXH);


-- ----------------------------
-- Table structure for TY_LQXX
-- ----------------------------
DROP TABLE TY_LQXX;
CREATE TABLE TY_LQXX (
LQID VARCHAR2(32 BYTE) NOT NULL ,
JCSJ DATE NULL ,
HWBM VARCHAR2(30 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
CFWW NUMBER(9,2) NULL ,
CFWS NUMBER(9,2) NULL ,
CFNW NUMBER(9,2) NULL ,
CFNS NUMBER(9,2) NULL ,
CFZGWD NUMBER(9,2) NULL ,
CFZDWD NUMBER(9,2) NULL ,
CFPJWD NUMBER(9,2) NULL ,
CFWDXX VARCHAR2(4000 BYTE) NULL ,
CFSDXX VARCHAR2(4000 BYTE) NULL ,
CFSFXX VARCHAR2(4000 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_LQXX IS '粮情信息';
COMMENT ON COLUMN TY_LQXX.LQID IS '粮情ID LQ20190802000001';
COMMENT ON COLUMN TY_LQXX.JCSJ IS '监测时间';
COMMENT ON COLUMN TY_LQXX.HWBM IS '货位编号';
COMMENT ON COLUMN TY_LQXX.CFBH IS '仓房编号 ';
COMMENT ON COLUMN TY_LQXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_LQXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_LQXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_LQXX.SSQYDM IS '所属企业代码 （统一社会信用代码';
COMMENT ON COLUMN TY_LQXX.SSYQMC IS '所属企业名称  ';
COMMENT ON COLUMN TY_LQXX.CFWW IS '仓房外温';
COMMENT ON COLUMN TY_LQXX.CFWS IS '仓房外湿';
COMMENT ON COLUMN TY_LQXX.CFNW IS '仓房内温	';
COMMENT ON COLUMN TY_LQXX.CFNS IS '仓房内湿';
COMMENT ON COLUMN TY_LQXX.CFZGWD IS '最高温度';
COMMENT ON COLUMN TY_LQXX.CFZDWD IS '最低温度';
COMMENT ON COLUMN TY_LQXX.CFPJWD IS '平均温度';
COMMENT ON COLUMN TY_LQXX.CFWDXX IS '仓房温度信息';
COMMENT ON COLUMN TY_LQXX.CFSDXX IS '仓房湿度信息';
COMMENT ON COLUMN TY_LQXX.CFSFXX IS '仓房水分信息';
COMMENT ON COLUMN TY_LQXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_LQXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_LQXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_LQXX.CREATE_DATE IS 'c创建时间';
COMMENT ON COLUMN TY_LQXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_LQXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_LQXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_LQXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_LQXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_LQXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_LQXX
-- ----------------------------
ALTER TABLE TY_LQXX ADD CHECK (LQID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_LQXX
-- ----------------------------
ALTER TABLE TY_LQXX ADD PRIMARY KEY (LQID);


-- ----------------------------
-- Table structure for TY_LSKCXX
-- ----------------------------
DROP TABLE TY_LSKCXX;
CREATE TABLE TY_LSKCXX (
KCXXID VARCHAR2(32 BYTE) NOT NULL ,
HWBM VARCHAR2(30 BYTE) NULL ,
SSAJBH VARCHAR2(30 BYTE) NULL ,
SSAJMC VARCHAR2(20 BYTE) NULL ,
SSCFBH VARCHAR2(30 BYTE) NULL ,
SSCFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSYDDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
LSPZBM VARCHAR2(8 BYTE) NULL ,
LSPZMC VARCHAR2(30 BYTE) NULL ,
LSND VARCHAR2(4 BYTE) NULL ,
CCQJ VARCHAR2(4 BYTE) NULL ,
PZBM VARCHAR2(4 BYTE) NULL ,
LSXZBM VARCHAR2(4 BYTE) NULL ,
LSXZMC VARCHAR2(4 BYTE) NULL ,
RKSJ DATE NULL ,
CZHDDJ VARCHAR2(10 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
SHND VARCHAR2(4 BYTE) NULL ,
LSGB VARCHAR2(20 BYTE) NULL ,
LSCD VARCHAR2(20 BYTE) NULL ,
BGYBM VARCHAR2(30 BYTE) NULL ,
BGYMC VARCHAR2(50 BYTE) NULL ,
LQGSDWBM VARCHAR2(18 BYTE) NULL ,
LQGSDWMC VARCHAR2(50 BYTE) NULL ,
FCSJ DATE NULL ,
FCSL NUMBER(9,2) NULL ,
QCSJ DATE NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_LSKCXX IS '粮食库存信息表';
COMMENT ON COLUMN TY_LSKCXX.KCXXID IS '库存信息id KC20190802000001';
COMMENT ON COLUMN TY_LSKCXX.HWBM IS '货位编号（仓房编码+01 两位序号）';
COMMENT ON COLUMN TY_LSKCXX.SSAJBH IS '所属廒间编号（仓房编码+001 三位序号）';
COMMENT ON COLUMN TY_LSKCXX.SSAJMC IS '所属廒间名称';
COMMENT ON COLUMN TY_LSKCXX.SSCFBH IS '所属仓房编码（库点编码+001 三位序号）';
COMMENT ON COLUMN TY_LSKCXX.SSCFMC IS '所属仓房名称';
COMMENT ON COLUMN TY_LSKCXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_LSKCXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_LSKCXX.SSYDDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_LSKCXX.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_LSKCXX.LSPZBM IS '粮食品种编码';
COMMENT ON COLUMN TY_LSKCXX.LSPZMC IS '粮食品种名称';
COMMENT ON COLUMN TY_LSKCXX.LSND IS '粮食年度';
COMMENT ON COLUMN TY_LSKCXX.CCQJ IS '存储期间';
COMMENT ON COLUMN TY_LSKCXX.PZBM IS '年度';
COMMENT ON COLUMN TY_LSKCXX.LSXZBM IS '粮食性质编码（100：储备粮；110：国家储备粮；111：专项储备粮；112：战略储备粮；120：地方储备粮；121：省级地方储备粮）';
COMMENT ON COLUMN TY_LSKCXX.LSXZMC IS '粮食性质名称';
COMMENT ON COLUMN TY_LSKCXX.RKSJ IS '入库时间';
COMMENT ON COLUMN TY_LSKCXX.CZHDDJ IS '财政核定单价';
COMMENT ON COLUMN TY_LSKCXX.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_LSKCXX.LSDJMC IS '粮食等级名称';
COMMENT ON COLUMN TY_LSKCXX.SHND IS '收获年度';
COMMENT ON COLUMN TY_LSKCXX.LSGB IS '粮食国别';
COMMENT ON COLUMN TY_LSKCXX.LSCD IS '粮食产地';
COMMENT ON COLUMN TY_LSKCXX.BGYBM IS '保管员编码';
COMMENT ON COLUMN TY_LSKCXX.BGYMC IS '保管员名称';
COMMENT ON COLUMN TY_LSKCXX.LQGSDWBM IS '粮权归属单位代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_LSKCXX.LQGSDWMC IS '粮权归属单位名称 ';
COMMENT ON COLUMN TY_LSKCXX.FCSJ IS '封仓时间';
COMMENT ON COLUMN TY_LSKCXX.FCSL IS '封仓数量';
COMMENT ON COLUMN TY_LSKCXX.QCSJ IS '清仓时间';
COMMENT ON COLUMN TY_LSKCXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_LSKCXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_LSKCXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_LSKCXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_LSKCXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_LSKCXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_LSKCXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_LSKCXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_LSKCXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_LSKCXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_LSKCXX
-- ----------------------------
ALTER TABLE TY_LSKCXX ADD CHECK (KCXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_LSKCXX
-- ----------------------------
ALTER TABLE TY_LSKCXX ADD PRIMARY KEY (KCXXID);


-- ----------------------------
-- Table structure for TY_SLTPXX
-- ----------------------------
DROP TABLE TY_SLTPXX;
CREATE TABLE TY_SLTPXX (
TPID VARCHAR2(32 BYTE) NOT NULL ,
CJPSSJ DATE NULL ,
CJSCSJ DATE NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
TPWJMC VARCHAR2(30 BYTE) NULL ,
TPMS VARCHAR2(30 BYTE) NULL ,
TPLX VARCHAR2(4 BYTE) NULL ,
TPSJL VARCHAR2(4000 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_SLTPXX IS '涉粮图片信息';
COMMENT ON COLUMN TY_SLTPXX.TPID IS '粮情ID LQ20190802000001 ';
COMMENT ON COLUMN TY_SLTPXX.CJPSSJ IS '采集拍摄时间';
COMMENT ON COLUMN TY_SLTPXX.CJSCSJ IS '采集上传时间 ';
COMMENT ON COLUMN TY_SLTPXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_SLTPXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_SLTPXX.SSQYDM IS '所属企业代码 （统一社会信用代码';
COMMENT ON COLUMN TY_SLTPXX.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_SLTPXX.TPWJMC IS '图片文件名称';
COMMENT ON COLUMN TY_SLTPXX.TPMS IS '图片描述';
COMMENT ON COLUMN TY_SLTPXX.TPLX IS ' 图片类型	（0001：库区图片；0002：毛总前；0003：毛重后；0004：皮重前；0005皮重后；0006结算前；0007结算后；0008：其他）';
COMMENT ON COLUMN TY_SLTPXX.TPSJL IS '图片数据流';
COMMENT ON COLUMN TY_SLTPXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_SLTPXX.CREATOR IS '创建人 ';
COMMENT ON COLUMN TY_SLTPXX.CREATOR_CODE IS '创建人编码  ';
COMMENT ON COLUMN TY_SLTPXX.CREATE_DATE IS '创建时间 ';
COMMENT ON COLUMN TY_SLTPXX.REFRESHER IS '更新人 ';
COMMENT ON COLUMN TY_SLTPXX.REFRESHER_CODE IS '更新人编码  ';
COMMENT ON COLUMN TY_SLTPXX.REFRESH_TIME IS '更新时间 ';
COMMENT ON COLUMN TY_SLTPXX.REMARK IS '备注';

-- ----------------------------
-- Records of TY_SLTPXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_SLTPXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_SLTPXX
-- ----------------------------
ALTER TABLE TY_SLTPXX ADD CHECK (TPID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_SLTPXX
-- ----------------------------
ALTER TABLE TY_SLTPXX ADD PRIMARY KEY (TPID);


-- ----------------------------
-- Table structure for TY_TFZYXX
-- ----------------------------
DROP TABLE TY_TFZYXX;
CREATE TABLE TY_TFZYXX (
TFZYID VARCHAR2(32 BYTE) NOT NULL ,
FABH VARCHAR2(50 BYTE) NOT NULL ,
FAMC VARCHAR2(50 BYTE) NOT NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
LSXZBM VARCHAR2(4 BYTE) NULL ,
LSXZMC VARCHAR2(4 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
BGYBM VARCHAR2(30 BYTE) NULL ,
BGYMC VARCHAR2(50 BYTE) NULL ,
TFFS VARCHAR2(30 BYTE) NULL ,
TFCJR VARCHAR2(30 BYTE) NULL ,
ZYZT VARCHAR2(8 BYTE) NULL ,
ZYJSSJ DATE NULL ,
CFLX VARCHAR2(30 BYTE) NULL ,
CFCC VARCHAR2(30 BYTE) NULL ,
CFSL VARCHAR2(30 BYTE) NULL ,
CDDW VARCHAR2(30 BYTE) NULL ,
BGDW VARCHAR2(30 BYTE) NULL ,
SJZLGD VARCHAR2(30 BYTE) NULL ,
CFBGY VARCHAR2(30 BYTE) NULL ,
FJLXJXH VARCHAR2(30 BYTE) NULL ,
QLFX VARCHAR2(30 BYTE) NULL ,
FWZZL VARCHAR2(30 BYTE) NULL ,
CFZFL VARCHAR2(30 BYTE) NULL ,
CFFJGL VARCHAR2(30 BYTE) NULL ,
DWTFL VARCHAR2(30 BYTE) NULL ,
DCORDSL VARCHAR2(30 BYTE) NULL ,
DCORDSLCC VARCHAR2(30 BYTE) NULL ,
KQTJB VARCHAR2(30 BYTE) NULL ,
KBKKL VARCHAR2(30 BYTE) NULL ,
KSTFSJ DATE NULL ,
JSTFSJ DATE NULL ,
TFTJSJ VARCHAR2(30 BYTE) NULL ,
LJTFSJ VARCHAR2(30 BYTE) NULL ,
TFSQWZGZ NUMBER(9,2) NULL ,
TFSQWZDZ NUMBER(9,2) NULL ,
TFSQWPJZ NUMBER(9,2) NULL ,
TFSQSZGZ NUMBER(9,2) NULL ,
TFSQSZDZ NUMBER(9,2) NULL ,
TFSQSPJZ NUMBER(9,2) NULL ,
TFQZDGW NUMBER(9,2) NULL ,
TFQZDLW NUMBER(9,2) NULL ,
TFQPJLW NUMBER(9,2) NULL ,
TFQLWZDTD NUMBER(9,2) NULL ,
TFHLWZGZ NUMBER(9,2) NULL ,
TFHLSWDZDZ NUMBER(9,2) NULL ,
TFHLSWDPJZ NUMBER(9,2) NULL ,
TFHLWZDTD NUMBER(9,2) NULL ,
TFQLSSFZGZ NUMBER(9,2) NULL ,
TFQLSSFZDZ NUMBER(9,2) NULL ,
TFQLSSFPJZ NUMBER(9,2) NULL ,
TFQSFZDTD NUMBER(9,2) NULL ,
TFHLSSFZGZ NUMBER(9,2) NULL ,
TFHLSSFZDZ NUMBER(9,2) NULL ,
TFHLSSFPJZ NUMBER(9,2) NULL ,
TFHLSSFZDTD NUMBER(9,2) NULL ,
ZHD NUMBER(9,2) NULL ,
DWNH NUMBER(9,2) NULL ,
CZR VARCHAR2(30 BYTE) NULL ,
FZR VARCHAR2(30 BYTE) NULL ,
XGFX VARCHAR2(30 BYTE) NULL ,
XZQB VARCHAR2(30 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_TFZYXX IS '通风作业信息';
COMMENT ON COLUMN TY_TFZYXX.TFZYID IS '通风ZYID TF20190802000001 ';
COMMENT ON COLUMN TY_TFZYXX.FABH IS '方案编号/作业单编号';
COMMENT ON COLUMN TY_TFZYXX.FAMC IS '方案名称/作业单名称';
COMMENT ON COLUMN TY_TFZYXX.PZBM IS '品种编码';
COMMENT ON COLUMN TY_TFZYXX.PZMC IS '品种名称 ';
COMMENT ON COLUMN TY_TFZYXX.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_TFZYXX.LSDJMC IS '粮食等级名称';
COMMENT ON COLUMN TY_TFZYXX.LSXZBM IS ' 粮食性质编码 （100：储备粮；110：国家储备粮；111：专项储备粮；112：战略储备粮；120：地方储备粮；121：省级地方储备粮）';
COMMENT ON COLUMN TY_TFZYXX.LSXZMC IS '粮食性质名称';
COMMENT ON COLUMN TY_TFZYXX.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_TFZYXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_TFZYXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_TFZYXX.SSKDMC IS '所属库点名称	';
COMMENT ON COLUMN TY_TFZYXX.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_TFZYXX.SSYQMC IS '所属企业名称  ';
COMMENT ON COLUMN TY_TFZYXX.BGYBM IS '保管员编码';
COMMENT ON COLUMN TY_TFZYXX.BGYMC IS '保管员名称';
COMMENT ON COLUMN TY_TFZYXX.TFFS IS '通风方式';
COMMENT ON COLUMN TY_TFZYXX.TFCJR IS '创建人';
COMMENT ON COLUMN TY_TFZYXX.ZYZT IS '作业状态';
COMMENT ON COLUMN TY_TFZYXX.ZYJSSJ IS '作业结束时间';
COMMENT ON COLUMN TY_TFZYXX.CFLX IS '仓房类型';
COMMENT ON COLUMN TY_TFZYXX.CFCC IS '仓房尺寸';
COMMENT ON COLUMN TY_TFZYXX.CFSL IS '数量';
COMMENT ON COLUMN TY_TFZYXX.CDDW IS '承贷单位';
COMMENT ON COLUMN TY_TFZYXX.BGDW IS '保管单位';
COMMENT ON COLUMN TY_TFZYXX.SJZLGD IS '实际装粮高度';
COMMENT ON COLUMN TY_TFZYXX.CFBGY IS '保管员';
COMMENT ON COLUMN TY_TFZYXX.FJLXJXH IS '风机类型及型号';
COMMENT ON COLUMN TY_TFZYXX.QLFX IS '气流方向';
COMMENT ON COLUMN TY_TFZYXX.FWZZL IS '风网总阻力';
COMMENT ON COLUMN TY_TFZYXX.CFZFL IS '总风量';
COMMENT ON COLUMN TY_TFZYXX.CFFJGL IS '风机功率';
COMMENT ON COLUMN TY_TFZYXX.DWTFL IS '单位通风量';
COMMENT ON COLUMN TY_TFZYXX.DCORDSL IS '地槽或地上笼';
COMMENT ON COLUMN TY_TFZYXX.DCORDSLCC IS '地槽或地上笼尺寸';
COMMENT ON COLUMN TY_TFZYXX.KQTJB IS '空气途径比';
COMMENT ON COLUMN TY_TFZYXX.KBKKL IS '孔板开孔率';
COMMENT ON COLUMN TY_TFZYXX.KSTFSJ IS '开始通风时间';
COMMENT ON COLUMN TY_TFZYXX.JSTFSJ IS '结束通风时间';
COMMENT ON COLUMN TY_TFZYXX.TFTJSJ IS '停机时间';
COMMENT ON COLUMN TY_TFZYXX.LJTFSJ IS '累计通风时间';
COMMENT ON COLUMN TY_TFZYXX.TFSQWZGZ IS '通风时气温最高值';
COMMENT ON COLUMN TY_TFZYXX.TFSQWZDZ IS '通风时气温最低值';
COMMENT ON COLUMN TY_TFZYXX.TFSQWPJZ IS '通风时气温平均值';
COMMENT ON COLUMN TY_TFZYXX.TFSQSZGZ IS '通风时气湿最高值';
COMMENT ON COLUMN TY_TFZYXX.TFSQSZDZ IS '通风时气湿最低值';
COMMENT ON COLUMN TY_TFZYXX.TFSQSPJZ IS '通风时气湿平均值';
COMMENT ON COLUMN TY_TFZYXX.TFQZDGW IS '通风前最高粮温';
COMMENT ON COLUMN TY_TFZYXX.TFQZDLW IS '通风前最低粮温';
COMMENT ON COLUMN TY_TFZYXX.TFQPJLW IS '通风前平均粮温';
COMMENT ON COLUMN TY_TFZYXX.TFQLWZDTD IS '通风前粮温最大梯度';
COMMENT ON COLUMN TY_TFZYXX.TFHLWZGZ IS '通风后粮食温度最高值';
COMMENT ON COLUMN TY_TFZYXX.TFHLSWDZDZ IS '通风后粮食温度最低值';
COMMENT ON COLUMN TY_TFZYXX.TFHLSWDPJZ IS '通风后粮食温度平均值';
COMMENT ON COLUMN TY_TFZYXX.TFHLWZDTD IS '通风后粮温最大梯度';
COMMENT ON COLUMN TY_TFZYXX.TFQLSSFZGZ IS '通风前粮食水分最高值';
COMMENT ON COLUMN TY_TFZYXX.TFQLSSFZDZ IS '通风前粮食水分最低值';
COMMENT ON COLUMN TY_TFZYXX.TFQLSSFPJZ IS '通风前粮食水分平均值';
COMMENT ON COLUMN TY_TFZYXX.TFQSFZDTD IS '通风前水分最大梯度';
COMMENT ON COLUMN TY_TFZYXX.TFHLSSFZGZ IS '通风后粮食水分最高值';
COMMENT ON COLUMN TY_TFZYXX.TFHLSSFZDZ IS '通风后粮食水分最低值';
COMMENT ON COLUMN TY_TFZYXX.TFHLSSFPJZ IS '通风后粮食水分平均值';
COMMENT ON COLUMN TY_TFZYXX.TFHLSSFZDTD IS '通风后粮食水分最大梯度';
COMMENT ON COLUMN TY_TFZYXX.ZHD IS '总耗电';
COMMENT ON COLUMN TY_TFZYXX.DWNH IS '单位能耗';
COMMENT ON COLUMN TY_TFZYXX.CZR IS '操作人';
COMMENT ON COLUMN TY_TFZYXX.FZR IS '负责人';
COMMENT ON COLUMN TY_TFZYXX.XGFX IS '效果分析';
COMMENT ON COLUMN TY_TFZYXX.XZQB IS '行政区划 ';
COMMENT ON COLUMN TY_TFZYXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_TFZYXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_TFZYXX.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_TFZYXX.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_TFZYXX.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_TFZYXX.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_TFZYXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_TFZYXX.REMARK IS '备注 	';

-- ----------------------------
-- Records of TY_TFZYXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_TFZYXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_TFZYXX
-- ----------------------------
ALTER TABLE TY_TFZYXX ADD CHECK (TFZYID IS NOT NULL);
ALTER TABLE TY_TFZYXX ADD CHECK (FABH IS NOT NULL);
ALTER TABLE TY_TFZYXX ADD CHECK (FAMC IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_TFZYXX
-- ----------------------------
ALTER TABLE TY_TFZYXX ADD PRIMARY KEY (TFZYID);


-- ----------------------------
-- Table structure for TY_XZZYXX
-- ----------------------------
DROP TABLE TY_XZZYXX;
CREATE TABLE TY_XZZYXX (
XZZYID VARCHAR2(32 BYTE) NOT NULL ,
FABH VARCHAR2(50 BYTE) NOT NULL ,
FAMC VARCHAR2(50 BYTE) NOT NULL ,
PZBM VARCHAR2(8 BYTE) NULL ,
PZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
LSXZBM VARCHAR2(4 BYTE) NULL ,
LSXZMC VARCHAR2(4 BYTE) NULL ,
CFBH VARCHAR2(30 BYTE) NULL ,
CFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
BGYBM VARCHAR2(30 BYTE) NULL ,
BGYMC VARCHAR2(50 BYTE) NULL ,
LDTJ NUMBER(9,2) NULL ,
KJTJ NUMBER(9,2) NULL ,
ZTJ NUMBER(9,2) NULL ,
ZYCH VARCHAR2(30 BYTE) NULL ,
HCMD VARCHAR2(30 BYTE) NULL ,
XZFS VARCHAR2(30 BYTE) NULL ,
YJMC VARCHAR2(30 BYTE) NULL ,
YJCD VARCHAR2(30 BYTE) NULL ,
SYFF VARCHAR2(30 BYTE) NULL ,
MBFF VARCHAR2(30 BYTE) NULL ,
SDND VARCHAR2(30 BYTE) NULL ,
CCSYSJ DATE NULL ,
CCDWJL VARCHAR2(30 BYTE) NULL ,
CCYYL VARCHAR2(30 BYTE) NULL ,
HLSJ DATE NULL ,
CCBYRQ VARCHAR2(30 BYTE) NULL ,
CCBYL VARCHAR2(30 BYTE) NULL ,
ZHBYRQ VARCHAR2(30 BYTE) NULL ,
ZHBYL VARCHAR2(30 BYTE) NULL ,
ZBYL VARCHAR2(30 BYTE) NULL ,
ZYYL VARCHAR2(30 BYTE) NULL ,
BYFF VARCHAR2(30 BYTE) NULL ,
XZRS VARCHAR2(30 BYTE) NULL ,
XZZHR VARCHAR2(30 BYTE) NULL ,
SYRS VARCHAR2(30 BYTE) NULL ,
XZCZR VARCHAR2(30 BYTE) NULL ,
FHR VARCHAR2(30 BYTE) NULL ,
HLFJ VARCHAR2(30 BYTE) NULL ,
SYSB VARCHAR2(30 BYTE) NULL ,
CFMBX VARCHAR2(30 BYTE) NULL ,
GKZYPT VARCHAR2(30 BYTE) NULL ,
LHQJCY VARCHAR2(30 BYTE) NULL ,
LHQBJY VARCHAR2(30 BYTE) NULL ,
CYY VARCHAR2(30 BYTE) NULL ,
KQHXQ VARCHAR2(30 BYTE) NULL ,
JJXJSP VARCHAR2(30 BYTE) NULL ,
MHQ VARCHAR2(30 BYTE) NULL ,
JJX VARCHAR2(30 BYTE) NULL ,
SQKSSJ DATE NULL ,
SQJSSJ DATE NULL ,
SQFF VARCHAR2(30 BYTE) NULL ,
SQJSDQND VARCHAR2(30 BYTE) NULL ,
YJCLL VARCHAR2(30 BYTE) NULL ,
QYPYWD VARCHAR2(30 BYTE) NULL ,
QYPYSD VARCHAR2(30 BYTE) NULL ,
QYPYHCS VARCHAR2(30 BYTE) NULL ,
LDSCXG VARCHAR2(30 BYTE) NULL ,
JCCLSJ DATE NULL ,
CLSCSWL VARCHAR2(30 BYTE) NULL ,
XGFX VARCHAR2(30 BYTE) NULL ,
ZYZT VARCHAR2(30 BYTE) NULL ,
ZYJSSJ DATE NULL ,
XZQH VARCHAR2(30 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_XZZYXX IS '熏蒸作业信息';
COMMENT ON COLUMN TY_XZZYXX.XZZYID IS '熏蒸ZYID XZ20190802000001';
COMMENT ON COLUMN TY_XZZYXX.FABH IS '方案编号';
COMMENT ON COLUMN TY_XZZYXX.FAMC IS '方案名称';
COMMENT ON COLUMN TY_XZZYXX.PZBM IS '品种编码 ';
COMMENT ON COLUMN TY_XZZYXX.PZMC IS '品种名称  ';
COMMENT ON COLUMN TY_XZZYXX.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_XZZYXX.LSDJMC IS '粮食等级名称	';
COMMENT ON COLUMN TY_XZZYXX.LSXZBM IS '粮食性质编码 （100：储备粮；110：国家储备粮；111：专项储备粮；112：战略储备粮；120：地方储备粮；121：省级地方储备粮）';
COMMENT ON COLUMN TY_XZZYXX.LSXZMC IS '粮食性质名称';
COMMENT ON COLUMN TY_XZZYXX.CFBH IS '仓房编号';
COMMENT ON COLUMN TY_XZZYXX.CFMC IS '仓房名称';
COMMENT ON COLUMN TY_XZZYXX.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_XZZYXX.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_XZZYXX.SSQYDM IS '所属企业代码 （统一社会信用代码） ';
COMMENT ON COLUMN TY_XZZYXX.SSYQMC IS '所属企业名称   ';
COMMENT ON COLUMN TY_XZZYXX.BGYBM IS '保管员编码';
COMMENT ON COLUMN TY_XZZYXX.BGYMC IS '保管员名称';
COMMENT ON COLUMN TY_XZZYXX.LDTJ IS '粮堆体积';
COMMENT ON COLUMN TY_XZZYXX.KJTJ IS '空间体积';
COMMENT ON COLUMN TY_XZZYXX.ZTJ IS '总体积 ';
COMMENT ON COLUMN TY_XZZYXX.ZYCH IS '主要虫害';
COMMENT ON COLUMN TY_XZZYXX.HCMD IS '害虫密度';
COMMENT ON COLUMN TY_XZZYXX.XZFS IS '熏蒸方式';
COMMENT ON COLUMN TY_XZZYXX.YJMC IS '药剂名称';
COMMENT ON COLUMN TY_XZZYXX.YJCD IS '药剂纯度';
COMMENT ON COLUMN TY_XZZYXX.SYFF IS '施药方法';
COMMENT ON COLUMN TY_XZZYXX.MBFF IS '密闭方法';
COMMENT ON COLUMN TY_XZZYXX.SDND IS '设定浓度';
COMMENT ON COLUMN TY_XZZYXX.CCSYSJ IS '初次施药时间';
COMMENT ON COLUMN TY_XZZYXX.CCDWJL IS '初次单位剂量';
COMMENT ON COLUMN TY_XZZYXX.CCYYL IS '初次用药量';
COMMENT ON COLUMN TY_XZZYXX.HLSJ IS '环流时间';
COMMENT ON COLUMN TY_XZZYXX.CCBYRQ IS '初次补药日期';
COMMENT ON COLUMN TY_XZZYXX.CCBYL IS '初次补药量';
COMMENT ON COLUMN TY_XZZYXX.ZHBYRQ IS ' 最后补药日期';
COMMENT ON COLUMN TY_XZZYXX.ZHBYL IS '最后补药量';
COMMENT ON COLUMN TY_XZZYXX.ZBYL IS '总补药量';
COMMENT ON COLUMN TY_XZZYXX.ZYYL IS '总用药量';
COMMENT ON COLUMN TY_XZZYXX.BYFF IS '补药方法';
COMMENT ON COLUMN TY_XZZYXX.XZRS IS '熏蒸人数';
COMMENT ON COLUMN TY_XZZYXX.XZZHR IS '现在指挥人';
COMMENT ON COLUMN TY_XZZYXX.SYRS IS '施药人数';
COMMENT ON COLUMN TY_XZZYXX.XZCZR IS '熏蒸操作人';
COMMENT ON COLUMN TY_XZZYXX.FHR IS '防护人';
COMMENT ON COLUMN TY_XZZYXX.HLFJ IS '环流风机/阀门（0：否；1：是）';
COMMENT ON COLUMN TY_XZZYXX.SYSB IS '施药设备';
COMMENT ON COLUMN TY_XZZYXX.CFMBX IS '仓房密闭性';
COMMENT ON COLUMN TY_XZZYXX.GKZYPT IS '高考作业平台安全监测';
COMMENT ON COLUMN TY_XZZYXX.LHQJCY IS '磷化氢检测仪';
COMMENT ON COLUMN TY_XZZYXX.LHQBJY IS '磷化氢报警仪';
COMMENT ON COLUMN TY_XZZYXX.CYY IS '测氧仪';
COMMENT ON COLUMN TY_XZZYXX.KQHXQ IS '空气呼吸器';
COMMENT ON COLUMN TY_XZZYXX.JJXJSP IS '警戒线/警示牌';
COMMENT ON COLUMN TY_XZZYXX.MHQ IS '灭火器';
COMMENT ON COLUMN TY_XZZYXX.JJX IS '急救箱';
COMMENT ON COLUMN TY_XZZYXX.SQKSSJ IS '散气开始时间';
COMMENT ON COLUMN TY_XZZYXX.SQJSSJ IS '散气结束时间';
COMMENT ON COLUMN TY_XZZYXX.SQFF IS '散气方法';
COMMENT ON COLUMN TY_XZZYXX.SQJSDQND IS '散气结束时毒气浓度';
COMMENT ON COLUMN TY_XZZYXX.YJCLL IS '药剂残留率';
COMMENT ON COLUMN TY_XZZYXX.QYPYWD IS '取样培养温度';
COMMENT ON COLUMN TY_XZZYXX.QYPYSD IS '取样培养湿度';
COMMENT ON COLUMN TY_XZZYXX.QYPYHCS IS '取样培养30天后活虫数';
COMMENT ON COLUMN TY_XZZYXX.LDSCXG IS '粮堆杀虫效果或杀虫率';
COMMENT ON COLUMN TY_XZZYXX.JCCLSJ IS '检查虫笼时间';
COMMENT ON COLUMN TY_XZZYXX.CLSCSWL IS '虫笼害虫死亡率';
COMMENT ON COLUMN TY_XZZYXX.XGFX IS '效果分析';
COMMENT ON COLUMN TY_XZZYXX.ZYZT IS '作业状态';
COMMENT ON COLUMN TY_XZZYXX.ZYJSSJ IS '作业结束时间';
COMMENT ON COLUMN TY_XZZYXX.XZQH IS '行政区划';
COMMENT ON COLUMN TY_XZZYXX.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_XZZYXX.CREATOR IS '创建人';
COMMENT ON COLUMN TY_XZZYXX.CREATOR_CODE IS '创建人编码 ';
COMMENT ON COLUMN TY_XZZYXX.CREATE_DATE IS '创建时间 ';
COMMENT ON COLUMN TY_XZZYXX.REFRESHER IS '更新人 ';
COMMENT ON COLUMN TY_XZZYXX.REFRESHER_CODE IS '更新人编码 ';
COMMENT ON COLUMN TY_XZZYXX.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_XZZYXX.REMARK IS ' 备注';

-- ----------------------------
-- Records of TY_XZZYXX
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_XZZYXX
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_XZZYXX
-- ----------------------------
ALTER TABLE TY_XZZYXX ADD CHECK (XZZYID IS NOT NULL);
ALTER TABLE TY_XZZYXX ADD CHECK (FABH IS NOT NULL);
ALTER TABLE TY_XZZYXX ADD CHECK (FAMC IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_XZZYXX
-- ----------------------------
ALTER TABLE TY_XZZYXX ADD PRIMARY KEY (XZZYID);

-- ----------------------------
-- Table structure for TY_ZJXXMXB
-- ----------------------------
DROP TABLE TY_ZJXXMXB;
CREATE TABLE TY_ZJXXMXB (
SXH NUMBER NOT NULL ,
ZJXXID VARCHAR2(32 BYTE) NOT NULL ,
JYDH VARCHAR2(32 BYTE) NULL ,
JYBZBH VARCHAR2(60 BYTE) NULL ,
JYXM VARCHAR2(128 BYTE) NULL ,
BZYQPDGZ VARCHAR2(128 BYTE) NULL ,
JYJG VARCHAR2(128 BYTE) NULL ,
DXPD VARCHAR2(32 BYTE) NULL ,
JCRBM VARCHAR2(30 BYTE) NULL ,
JCRMC VARCHAR2(50 BYTE) NULL ,
ZKLBL NUMBER(9,2) NULL ,
ZKSL NUMBER(9,2) NULL ,
ZKJE NUMBER(9,2) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_ZJXXMXB IS '质检信息明细表';
COMMENT ON COLUMN TY_ZJXXMXB.SXH IS '顺序号';
COMMENT ON COLUMN TY_ZJXXMXB.ZJXXID IS '质检信息id ZJ20190802000001';
COMMENT ON COLUMN TY_ZJXXMXB.JYDH IS '检验单号';
COMMENT ON COLUMN TY_ZJXXMXB.JYBZBH IS '检测标准id';
COMMENT ON COLUMN TY_ZJXXMXB.JYXM IS '检验项目';
COMMENT ON COLUMN TY_ZJXXMXB.BZYQPDGZ IS '标准要求/判断规则';
COMMENT ON COLUMN TY_ZJXXMXB.JYJG IS '检测结果';
COMMENT ON COLUMN TY_ZJXXMXB.DXPD IS '单项判断';
COMMENT ON COLUMN TY_ZJXXMXB.JCRBM IS '检测人编码';
COMMENT ON COLUMN TY_ZJXXMXB.JCRMC IS '检测人名称';
COMMENT ON COLUMN TY_ZJXXMXB.ZKLBL IS '增扣量比例';
COMMENT ON COLUMN TY_ZJXXMXB.ZKSL IS '增扣数量（kg）';
COMMENT ON COLUMN TY_ZJXXMXB.ZKJE IS '增扣金额（元）';
COMMENT ON COLUMN TY_ZJXXMXB.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_ZJXXMXB.CREATOR IS '创建人';
COMMENT ON COLUMN TY_ZJXXMXB.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_ZJXXMXB.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_ZJXXMXB.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_ZJXXMXB.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_ZJXXMXB.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_ZJXXMXB.REMARK IS '备注';

-- ----------------------------
-- Records of TY_ZJXXMXB
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_ZJXXMXB
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_ZJXXMXB
-- ----------------------------
ALTER TABLE TY_ZJXXMXB ADD CHECK (SXH IS NOT NULL);
ALTER TABLE TY_ZJXXMXB ADD CHECK (ZJXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_ZJXXMXB
-- ----------------------------
ALTER TABLE TY_ZJXXMXB ADD PRIMARY KEY (ZJXXID, SXH);


-- ----------------------------
-- Table structure for TY_ZJXXZB
-- ----------------------------
DROP TABLE TY_ZJXXZB;
CREATE TABLE TY_ZJXXZB (
ZJXXID VARCHAR2(32 BYTE) NOT NULL ,
ZJBGBH VARCHAR2(32 BYTE) NULL ,
ZJBGMC VARCHAR2(50 BYTE) NULL ,
HWBM VARCHAR2(30 BYTE) NULL ,
SSAJBH VARCHAR2(30 BYTE) NULL ,
SSAJMC VARCHAR2(20 BYTE) NULL ,
SSCFBH VARCHAR2(30 BYTE) NULL ,
SSCFMC VARCHAR2(20 BYTE) NULL ,
SSKDDM VARCHAR2(30 BYTE) NULL ,
SSKDMC VARCHAR2(50 BYTE) NULL ,
SSQYDM VARCHAR2(18 BYTE) NULL ,
SSYQMC VARCHAR2(50 BYTE) NULL ,
WTDWDM VARCHAR2(18 BYTE) NULL ,
WTDWMC VARCHAR2(50 BYTE) NULL ,
JYDWDM VARCHAR2(18 BYTE) NULL ,
JYDWMC VARCHAR2(50 BYTE) NULL ,
LSPZBM VARCHAR2(8 BYTE) NULL ,
LSPZMC VARCHAR2(30 BYTE) NULL ,
LSDJBM VARCHAR2(2 BYTE) NULL ,
LSDJMC VARCHAR2(20 BYTE) NULL ,
SHND VARCHAR2(4 BYTE) NULL ,
LSGB VARCHAR2(20 BYTE) NULL ,
LSCD VARCHAR2(20 BYTE) NULL ,
JYLBBM VARCHAR2(4 BYTE) NULL ,
JYRQ DATE NULL ,
JYYJ VARCHAR2(2 BYTE) NULL ,
QYDBH VARCHAR2(30 BYTE) NULL ,
YPSLDW NUMBER(9,2) NULL ,
DBSLDW NUMBER(9,2) NULL ,
GGXH VARCHAR2(128 BYTE) NULL ,
SCRQPC VARCHAR2(128 BYTE) NULL ,
LYFS VARCHAR2(128 BYTE) NULL ,
YPZTBS VARCHAR2(128 BYTE) NULL ,
ZXCPBZH VARCHAR2(128 BYTE) NULL ,
JYPDYJ VARCHAR2(128 BYTE) NULL ,
CHECK_REMARK VARCHAR2(1024 BYTE) NULL ,
RKNX NUMBER(2) NULL ,
QYDD VARCHAR2(50 BYTE) NULL ,
QYRBM VARCHAR2(30 BYTE) NULL ,
QYRMC VARCHAR2(50 BYTE) NULL ,
JYJG VARCHAR2(500 BYTE) NULL ,
BZSJ DATE NULL ,
BZRBM VARCHAR2(30 BYTE) NULL ,
BZRMC VARCHAR2(50 BYTE) NULL ,
SHSJ DATE NULL ,
SHRBM VARCHAR2(30 BYTE) NULL ,
SHRMC VARCHAR2(50 BYTE) NULL ,
QFSJ DATE NULL ,
QFRBM VARCHAR2(30 BYTE) NULL ,
QFRMC VARCHAR2(50 BYTE) NULL ,
ZSBM VARCHAR2(50 BYTE) NULL ,
STATUS NUMBER DEFAULT ('1')  NULL ,
CREATOR VARCHAR2(32 BYTE) NULL ,
CREATOR_CODE VARCHAR2(32 BYTE) NULL ,
CREATE_DATE TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REFRESHER VARCHAR2(32 BYTE) NULL ,
REFRESHER_CODE VARCHAR2(32 BYTE) NULL ,
REFRESH_TIME TIMESTAMP(6)  DEFAULT CURRENT_TIMESTAMP  NULL ,
REMARK VARCHAR2(1000 BYTE) NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE TY_ZJXXZB IS '质检报告信息主表';
COMMENT ON COLUMN TY_ZJXXZB.ZJXXID IS '质检信息id ZJ20190802000001';
COMMENT ON COLUMN TY_ZJXXZB.ZJBGBH IS '质检报告编号';
COMMENT ON COLUMN TY_ZJXXZB.ZJBGMC IS '质检报告名称';
COMMENT ON COLUMN TY_ZJXXZB.HWBM IS '货位编号（仓房编码+01 两位序号）';
COMMENT ON COLUMN TY_ZJXXZB.SSAJBH IS '所属廒间编号（仓房编码+001 三位序号）';
COMMENT ON COLUMN TY_ZJXXZB.SSAJMC IS '所属廒间名称';
COMMENT ON COLUMN TY_ZJXXZB.SSCFBH IS '所属仓房编码（库点编码+001 三位序号）';
COMMENT ON COLUMN TY_ZJXXZB.SSCFMC IS '所属仓房名称';
COMMENT ON COLUMN TY_ZJXXZB.SSKDDM IS '所属库点编码';
COMMENT ON COLUMN TY_ZJXXZB.SSKDMC IS '所属库点名称';
COMMENT ON COLUMN TY_ZJXXZB.SSQYDM IS '所属企业代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_ZJXXZB.SSYQMC IS '所属企业名称';
COMMENT ON COLUMN TY_ZJXXZB.WTDWDM IS '委托单位代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_ZJXXZB.WTDWMC IS '委托单位名称';
COMMENT ON COLUMN TY_ZJXXZB.JYDWDM IS '检验单位代码 （统一社会信用代码）';
COMMENT ON COLUMN TY_ZJXXZB.JYDWMC IS '检验单位名称';
COMMENT ON COLUMN TY_ZJXXZB.LSPZBM IS '粮食品种编码';
COMMENT ON COLUMN TY_ZJXXZB.LSPZMC IS '粮食品种名称';
COMMENT ON COLUMN TY_ZJXXZB.LSDJBM IS '粮食等级编码（01：一等；02：二等；03：三等；04：四等；05：五等；06：等外）';
COMMENT ON COLUMN TY_ZJXXZB.LSDJMC IS '粮食等级名称';
COMMENT ON COLUMN TY_ZJXXZB.SHND IS '收获年度';
COMMENT ON COLUMN TY_ZJXXZB.LSGB IS '粮食国别';
COMMENT ON COLUMN TY_ZJXXZB.LSCD IS '粮食产地';
COMMENT ON COLUMN TY_ZJXXZB.JYLBBM IS '检验类别（01：入库；02：出库；03：春普）';
COMMENT ON COLUMN TY_ZJXXZB.JYRQ IS '检验时间';
COMMENT ON COLUMN TY_ZJXXZB.JYYJ IS '检验依据（01：国标；00：其他）';
COMMENT ON COLUMN TY_ZJXXZB.QYDBH IS '样品单编号';
COMMENT ON COLUMN TY_ZJXXZB.YPSLDW IS '样品数量单位（kg） ';
COMMENT ON COLUMN TY_ZJXXZB.DBSLDW IS '代表数量单位（kg）';
COMMENT ON COLUMN TY_ZJXXZB.GGXH IS '规格型号';
COMMENT ON COLUMN TY_ZJXXZB.SCRQPC IS '清生产日期/批次';
COMMENT ON COLUMN TY_ZJXXZB.LYFS IS '来样方式';
COMMENT ON COLUMN TY_ZJXXZB.YPZTBS IS '样品状态标识';
COMMENT ON COLUMN TY_ZJXXZB.ZXCPBZH IS '执行产品标准号';
COMMENT ON COLUMN TY_ZJXXZB.JYPDYJ IS '检验/判定依据';
COMMENT ON COLUMN TY_ZJXXZB.CHECK_REMARK IS '检验备注';
COMMENT ON COLUMN TY_ZJXXZB.RKNX IS '入库年限';
COMMENT ON COLUMN TY_ZJXXZB.QYDD IS '签样地点';
COMMENT ON COLUMN TY_ZJXXZB.QYRBM IS '签样人编码';
COMMENT ON COLUMN TY_ZJXXZB.QYRMC IS '签样人名称';
COMMENT ON COLUMN TY_ZJXXZB.JYJG IS '检验结果';
COMMENT ON COLUMN TY_ZJXXZB.BZSJ IS '编制时间';
COMMENT ON COLUMN TY_ZJXXZB.BZRBM IS '编制人编码';
COMMENT ON COLUMN TY_ZJXXZB.BZRMC IS '编制人名称';
COMMENT ON COLUMN TY_ZJXXZB.SHSJ IS '审核时间';
COMMENT ON COLUMN TY_ZJXXZB.SHRBM IS '审核人编码';
COMMENT ON COLUMN TY_ZJXXZB.SHRMC IS '审核人名称';
COMMENT ON COLUMN TY_ZJXXZB.QFSJ IS '签发时间';
COMMENT ON COLUMN TY_ZJXXZB.QFRBM IS '签发人编码';
COMMENT ON COLUMN TY_ZJXXZB.QFRMC IS '签发人名称';
COMMENT ON COLUMN TY_ZJXXZB.ZSBM IS '证书编码';
COMMENT ON COLUMN TY_ZJXXZB.STATUS IS '状态，1：正常，0：已作废';
COMMENT ON COLUMN TY_ZJXXZB.CREATOR IS '创建人';
COMMENT ON COLUMN TY_ZJXXZB.CREATOR_CODE IS '创建人编码';
COMMENT ON COLUMN TY_ZJXXZB.CREATE_DATE IS '创建时间';
COMMENT ON COLUMN TY_ZJXXZB.REFRESHER IS '更新人';
COMMENT ON COLUMN TY_ZJXXZB.REFRESHER_CODE IS '更新人编码';
COMMENT ON COLUMN TY_ZJXXZB.REFRESH_TIME IS '更新时间';
COMMENT ON COLUMN TY_ZJXXZB.REMARK IS '备注';

-- ----------------------------
-- Records of TY_ZJXXZB
-- ----------------------------

-- ----------------------------
-- Indexes structure for table TY_ZJXXZB
-- ----------------------------

-- ----------------------------
-- Checks structure for table TY_ZJXXZB
-- ----------------------------
ALTER TABLE TY_ZJXXZB ADD CHECK (ZJXXID IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TY_ZJXXZB
-- ----------------------------
ALTER TABLE TY_ZJXXZB ADD PRIMARY KEY (ZJXXID);



-------------------------------------------------
-- 药剂
-------------------------------------------------
/*==============================================================*/
/* DBMS name:      ORACLE Version 11g                           */
/* Created on:     2019/10/18 19:53:14                          */
/*==============================================================*/


alter table CLHXYJBGTZ
   drop constraint FK_CLHXYJBG_REFERENCE_KD_BASE_;

alter table FQWXHXPCSZCLYCLQKB
   drop constraint FK_FQWXHXPC_REFERENCE_KD_BASE_;

alter table WXHXPHJGLPCJBB
   drop constraint FK_WXHXPHJG_REFERENCE_KD_BASE_;

drop table CLHXYJBGTZ cascade constraints;

drop table FQWXHXPCSZCLYCLQKB cascade constraints;

drop table KD_BASE_INFO cascade constraints;

drop table WXHXPHJGLPCJBB cascade constraints;

/*==============================================================*/
/* Table: CLHXYJBGTZ                                            */
/*==============================================================*/
create table CLHXYJBGTZ
(
   ID                   VARCHAR2(99)         not null,
   SJ                   DATE,
   ZY                   VARCHAR2(999),
   YJLYDBH              VARCHAR2(999),
   KC                   NUMBER(10,2),
   KCLHLFJ              NUMBER(10,2),
   KCLHLPJ              NUMBER(10,2),
   KCDDW                NUMBER(10,2),
   KCMLLL               NUMBER(10,2),
   ZC                   NUMBER(10,2),
   ZCLHLFJ              NUMBER(10,2),
   ZCLHLPJ              NUMBER(10,2),
   ZCDDW                NUMBER(10,2),
   ZCMLLL               NUMBER(10,2),
   SR                   NUMBER(10,2),
   SRLHLFJ              NUMBER(10,2),
   SRLHLPJ              NUMBER(10,2),
   SRDDW                NUMBER(10,2),
   SRMLLL               NUMBER(10,2),
   TBR                  VARCHAR2(99),
   SHR                  VARCHAR2(99),
   KDDM                 VARCHAR2(99),
   constraint PK_CLHXYJBGTZ primary key (ID)
);

comment on table CLHXYJBGTZ is
'储量化学药剂保管台账';

comment on column CLHXYJBGTZ.SJ is
'时间';

comment on column CLHXYJBGTZ.ZY is
'摘要';

comment on column CLHXYJBGTZ.YJLYDBH is
'药剂领用单编号';

comment on column CLHXYJBGTZ.KC is
'库存';

comment on column CLHXYJBGTZ.KCLHLFJ is
'库存磷化铝粉剂';

comment on column CLHXYJBGTZ.KCLHLPJ is
'库存磷化铝片剂';

comment on column CLHXYJBGTZ.KCDDW is
'库存敌敌畏';

comment on column CLHXYJBGTZ.KCMLLL is
'库存马拉硫磷';

comment on column CLHXYJBGTZ.ZC is
'支出';

comment on column CLHXYJBGTZ.ZCLHLFJ is
'支出磷化铝粉剂';

comment on column CLHXYJBGTZ.ZCLHLPJ is
'支出磷化铝片剂';

comment on column CLHXYJBGTZ.ZCDDW is
'支出敌敌畏';

comment on column CLHXYJBGTZ.ZCMLLL is
'支出马拉硫磷';

comment on column CLHXYJBGTZ.SR is
'收入';

comment on column CLHXYJBGTZ.SRLHLFJ is
'收入磷化铝粉剂';

comment on column CLHXYJBGTZ.SRLHLPJ is
'收入磷化铝片剂';

comment on column CLHXYJBGTZ.SRDDW is
'收入敌敌畏';

comment on column CLHXYJBGTZ.SRMLLL is
'收入马拉硫磷';

comment on column CLHXYJBGTZ.TBR is
'填表人';

comment on column CLHXYJBGTZ.SHR is
'审核人';

comment on column CLHXYJBGTZ.KDDM is
'库点id';

/*==============================================================*/
/* Table: FQWXHXPCSZCLYCLQKB                                    */
/*==============================================================*/
create table FQWXHXPCSZCLYCLQKB
(
   ID                   VARCHAR2(99)         not null,
   XH                   VARCHAR2(999),
   WXPM                 VARCHAR2(999),
   CASH                 VARCHAR2(999),
   CSL                  NUMBER(10,2),
   ZXLYCZL              NUMBER(10,2),
   WTLYCZL              NUMBER(10,2),
   WTLYCZDWMC           VARCHAR2(999),
   XKZ                  VARCHAR2(999),
   ZCL                  NUMBER(10,2),
   ZXQK                 VARCHAR2(999),
   FZR                  VARCHAR2(99),
   LXFS                 VARCHAR2(99),
   KDDM                 VARCHAR2(99),
   constraint PK_FQWXHXPCSZCLYCLQKB primary key (ID)
);

comment on table FQWXHXPCSZCLYCLQKB is
'废弃危险化学品产生、贮存、利用处置情况表';

comment on column FQWXHXPCSZCLYCLQKB.XH is
'序号';

comment on column FQWXHXPCSZCLYCLQKB.WXPM is
'危险化学品品名';

comment on column FQWXHXPCSZCLYCLQKB.CASH is
'CAS号';

comment on column FQWXHXPCSZCLYCLQKB.CSL is
'产生量';

comment on column FQWXHXPCSZCLYCLQKB.ZXLYCZL is
'自行利用处置量kg';

comment on column FQWXHXPCSZCLYCLQKB.WTLYCZL is
'委托利用处置量kg';

comment on column FQWXHXPCSZCLYCLQKB.WTLYCZDWMC is
'委托利用处置单位名称';

comment on column FQWXHXPCSZCLYCLQKB.XKZ is
'委托利用处置单位是否持有危险废物经营许可证';

comment on column FQWXHXPCSZCLYCLQKB.ZCL is
'截至目前贮存量';

comment on column FQWXHXPCSZCLYCLQKB.ZXQK is
'危险废物管理计划，申报登记等执行情况';

comment on column FQWXHXPCSZCLYCLQKB.FZR is
'负责人';

comment on column FQWXHXPCSZCLYCLQKB.LXFS is
'联系方式';

comment on column FQWXHXPCSZCLYCLQKB.KDDM is
'库点id';

/*==============================================================*/
/* Table: KD_BASE_INFO                                          */
/*==============================================================*/
create table KD_BASE_INFO
(
   KDDM                 VARCHAR2(99),
   QYMC                 VARCHAR2(999),
   KDMC                 VARCHAR2(999),
   TBSJ                 date,
   HYDM                 VARCHAR2(99),
   MS                   VARCHAR2(999),
   QX                   VARCHAR2(999),
   GYYQ                 VARCHAR2(999),
   TZQF_CODE            VARCHAR2(1),
   "id"                 VARCHAR2(99)         not null,
   constraint PK_KD_BASE_INFO primary key ("id")
);

comment on table KD_BASE_INFO is
'库点基础信息';

comment on column KD_BASE_INFO.KDDM is
'库点代码';

comment on column KD_BASE_INFO.QYMC is
'企业名称';

comment on column KD_BASE_INFO.KDMC is
'库点名称';

comment on column KD_BASE_INFO.TBSJ is
'填报时间';

comment on column KD_BASE_INFO.HYDM is
'行业代码';

comment on column KD_BASE_INFO.MS is
'盟市';

comment on column KD_BASE_INFO.QX is
'旗县';

comment on column KD_BASE_INFO.GYYQ is
'工业园区';

comment on column KD_BASE_INFO.TZQF_CODE is
'1:储量化学药剂保管台账;2:危险化学品环境管理排查基本表;3:废弃危险化学品产生贮存利用处置情况表';

comment on column KD_BASE_INFO."id" is
'id';

/*==============================================================*/
/* Table: WXHXPHJGLPCJBB                                        */
/*==============================================================*/
create table WXHXPHJGLPCJBB
(
   ID                   VARCHAR2(99)         not null,
   XH                   VARCHAR2(999),
   WXHXPM               VARCHAR2(999),
   BM                   VARCHAR2(999),
   CASH                 VARCHAR2(999),
   SCSY                 VARCHAR2(9),
   SCSYL                NUMBER(10,2),
   SFSCWXHXB            VARCHAR2(9),
   BZ                   VARCHAR2(9),
   KDDM                 VARCHAR2(99),
   constraint PK_WXHXPHJGLPCJBB primary key (ID)
);

comment on table WXHXPHJGLPCJBB is
'危险化学品环境管理排查基本表';

comment on column WXHXPHJGLPCJBB.XH is
'序号';

comment on column WXHXPHJGLPCJBB.WXHXPM is
'危险化学品品名';

comment on column WXHXPHJGLPCJBB.BM is
'别名';

comment on column WXHXPHJGLPCJBB.CASH is
'CAS号';

comment on column WXHXPHJGLPCJBB.SCSY is
'生产/使用';

comment on column WXHXPHJGLPCJBB.SCSYL is
'生产/使用量(公斤)';

comment on column WXHXPHJGLPCJBB.SFSCWXHXB is
'是否生产废弃危险化学品';

comment on column WXHXPHJGLPCJBB.BZ is
'备注';

comment on column WXHXPHJGLPCJBB.KDDM is
'库点id';

alter table CLHXYJBGTZ
   add constraint FK_CLHXYJBG_REFERENCE_KD_BASE_ foreign key (KDDM)
      references KD_BASE_INFO ("id");

alter table FQWXHXPCSZCLYCLQKB
   add constraint FK_FQWXHXPC_REFERENCE_KD_BASE_ foreign key (KDDM)
      references KD_BASE_INFO ("id");

alter table WXHXPHJGLPCJBB
   add constraint FK_WXHXPHJG_REFERENCE_KD_BASE_ foreign key (KDDM)
      references KD_BASE_INFO ("id");

