
#维护时间:2022-10-27 作者:xuefy
脚本用途:客户表新增ERP客商编码
ALTER TABLE ap_company_inf ADD ACI_ERP_CODE VARCHAR(20)   COMMENT 'ERP客商编码';

#维护时间:2022-10-27 作者:xuefy
脚本用途:产品表新增ERP物料编码,单位换算比例
ALTER TABLE ap_product_inf ADD API_ERP_CODE VARCHAR(100)   COMMENT 'ERP物料编码';
ALTER TABLE ap_product_inf ADD API_UNIT_RATIO VARCHAR(20)  COMMENT '单位换算比例';


#维护时间:2022-10-27 作者:xuefy
脚本用途:合同表新增法务合同号
ALTER TABLE ap_contract_inf ADD ACI_LEGAL_CONTRACT_NO VARCHAR(100) NOT NULL COMMENT '法务合同号';

#维护时间:2022-11-01 作者:xuefy
脚本用途:订单表新增字段
ALTER TABLE ap_order_inf ADD AOI_TRANSFERRED_NUM VARCHAR(20)  NULL COMMENT '已传输数量';
ALTER TABLE ap_order_inf ADD AOI_REMAINING_TRANS_NUM VARCHAR(20)  NULL COMMENT '剩余传输数量';
ALTER TABLE ap_order_inf ADD AOI_ERP_NO VARCHAR(300)  NULL COMMENT 'ERP单号';


#维护时间:2022-11-01 作者:xuefy
脚本用途:订单传输流水表
CREATE TABLE ap_transfer_flow (
  ATF_ID 						varchar(20) 	NOT NULL 						COMMENT '编号',
  ATF_ORDER_ID 					varchar(20) 	NOT NULL		 				COMMENT '订单编号',
  ATF_GUID 						varchar(50) 	NOT NULL	 					COMMENT 'GUID',
  ATF_ERP_DATE					varchar(8)		NOT NULL						COMMENT 'ERP过帐日期',
  ATF_TRANSFERRED_NUM			varchar(20)		NOT NULL						COMMENT '已传输数量',
  ATF_TRANSFER_NUM				varchar(20)		NOT NULL						COMMENT '本次传输数量',
  ATF_REMAINING_TRANS_NUM		varchar(20)		NOT NULL						COMMENT '剩余传输数量',
  ATF_REAL_PRICE				varchar(20)		NOT NULL						COMMENT '实际单价',
  ATF_PRE_PRICE					varchar(20)		NOT NULL						COMMENT '预结算单价',
  ATF_REAL_TOTAL				varchar(20)		NOT NULL						COMMENT '本次实际结算总价',
  ATF_PRE_TOTAL					varchar(20)		NOT NULL						COMMENT '本次预结算总价',
  ATF_ERP_NO					varchar(20)		NOT NULL						COMMENT 'ERP单号',
  ATF_CREATE_USER 				varchar(20)  									COMMENT '创建人',
  ATF_CREATE_TIME 				varchar(14)  									COMMENT '创建时间',
  PRIMARY KEY (ATF_ID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单传输流水表';


#维护时间:2022-11-01 作者:xuefy
脚本用途:增加采购组应用参数
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','114','ZH_CN','铝业国贸山西铝业氧化铝采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','115','ZH_CN','铝业国贸进口及西南以外氧化铝采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','116','ZH_CN','铝业国贸西北地区氧化铝采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','117','ZH_CN','铝业国贸动力煤采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','118','ZH_CN','铝业国贸铝液采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','119','ZH_CN','铝业国贸石油焦采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','120','ZH_CN','铝业国贸系统内铝锭采购','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','121','ZH_CN','铝业国贸系统外铝锭采购','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','122','ZH_CN','铝业国贸办公用品采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','123','ZH_CN','铝业国贸电脑、信息化物品采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','124','ZH_CN','铝业国贸招待用品采购组','EBPP','0');
insert into pub_apppar (APR_NAME, APR_CODE, APR_VALUE, APR_LANGUAGE, APR_SHOWMSG, APR_TYPE, APR_MFLAG) values('采购组','PROCUREMEN','628','ZH_CN','铝业国贸氟化铝采购组','EBPP','0');

#维护时间:2022-11-01 作者:xuefy
脚本用途:合同新增采购组
ALTER TABLE ap_contract_inf ADD ACI_PURCHASE_TEAM VARCHAR(20)  NULL COMMENT '采购组';

#维护时间:2022-11-10 作者:xuefy
脚本用途:订单传输流水主键
insert into sequence (SEQ_NAME, CURRENT_VAL, INCREMENT_VAL, MIN_VAL, MAX_VAL,REMARKS)
values('AP_TRANST_ORDER_FLOW_ID','100000','1','100000','99999999','');

#维护时间:2022-11-11 作者:xuefy
脚本用途:订单传输url
insert into pub_syspar (SPR_CODE, SPR_NAME, SPR_VALUE, SPR_TYPE, SPR_SCOPE, SPR_MFLAG) 
values('TRANSFER_ORDER_URL','订单传输url', 'http://10.80.57.63:50100/','0','0','0');




update pub_syspar set SPR_VALUE = '127.0.0.1' where SPR_CODE = 'FTP_IP';
update pub_syspar set SPR_VALUE = '123456' where SPR_CODE = 'FTP_PASSWORD';
update pub_syspar set SPR_VALUE = 'ftpuser' where SPR_CODE = 'FTP_USERNAME';
update pub_syspar set SPR_VALUE = '/home/ftpuser/data/' where SPR_CODE = 'FILE_SERVER_BASE_PATH';
update pub_syspar set SPR_VALUE = 'http://127.0.0.1/ftp/' where SPR_CODE = 'FILE_SERVER_URL';
update pub_syspar set SPR_VALUE = 'http://baidubce/rest/2.0/ocr/v1/vat_invoice' where SPR_CODE = 'BAIDU_URL';
update pub_syspar set SPR_VALUE = 'http://jisuapi/invoiceverify/verify' where SPR_CODE = 'SCAN_INVOICE_URL';







