/**Begin 应收政策是带组织的表，框架是打开列表就新建 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_AR_POLICYEXC') 
CREATE TABLE T_AR_POLICYEXC (
	FDataID BIGINT DEFAULT 0 NOT NULL,
	FCreateOrgID BIGINT DEFAULT 0 NOT NULL,
	FUseOrgID BIGINT DEFAULT 0 NOT NULL
);

EXEC P_ALTERPK 'PK_T_AR_POLICYEXC', 'T_AR_POLICYEXC', 'FDataID,FUseOrgID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_AR_POLICYUSEREG') 
CREATE TABLE T_AR_POLICYUSEREG (
	FUseOrgID BIGINT DEFAULT 0 NOT NULL,
	FDataID BIGINT DEFAULT 0 NOT NULL,
	FCreateOrgID BIGINT DEFAULT 0 NOT NULL,
	FAdminOrgID BIGINT DEFAULT 0 NOT NULL,
	FCtrlStrategy VARCHAR(30) DEFAULT ' ' NOT NULL,
	FIsAssign CHAR(1) DEFAULT '0' NOT NULL
);

EXEC P_ALTERPK 'PK_T_AR_POLICYUSEREG', 'T_AR_POLICYUSEREG', 'FDataID,FUseOrgID', '1';

/**End **/
