EXEC P_ALTERPK 'PK_T_FPM_INOUTCOLLECT', 'T_FPM_INOUTCOLLECT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_INOUT') CREATE INDEX IDX_FPM_INOUT ON T_FPM_INOUTCOLLECT ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_INOUT_APPLYORG') CREATE INDEX IDX_FPM_INOUT_APPLYORG ON T_FPM_INOUTCOLLECT ( FAPPLYORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_INOUT_CRON') CREATE INDEX IDX_FPM_INOUT_CRON ON T_FPM_INOUTCOLLECT ( FCRONTEMPLATEID );


EXEC P_ALTERPK 'PK_T_FPM_INOUTCOLLECT_E', 'T_FPM_INOUTCOLLECT_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INOUTCOLLECT_E_FFUNDORGID') CREATE INDEX IDX_INOUTCOLLECT_E_FFUNDORGID ON T_FPM_INOUTCOLLECT_E ( FFUNDORGID );


EXEC P_ALTERPK 'PK_T_FPM_COLLECTRELATEREPORT', 'T_FPM_COLLECTRELATEREPORT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_COLLECTRELATE_FREPORTID') CREATE INDEX IDX_COLLECTRELATE_FREPORTID ON T_FPM_COLLECTRELATEREPORT ( FRELATEPLANREPORTID );


EXEC P_ALTERPK 'PK_T_FPM_CRONPLANMAINTAIN', 'T_FPM_CRONPLANMAINTAIN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CRONPLANMAINTAIN') CREATE INDEX IDX_CRONPLANMAINTAIN ON T_FPM_CRONPLANMAINTAIN ( FBILLNO );


EXEC P_ALTERPK 'PK_T_FPM_CRONPLANMAINTAIN_E', 'T_FPM_CRONPLANMAINTAIN_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CRONPLAN_APPLYORG') CREATE INDEX IDX_CRONPLAN_APPLYORG ON T_FPM_CRONPLANMAINTAIN_E ( FFUNDORGID );


EXEC P_ALTERPK 'PK_T_FPM_INOUTCOLLECT_LK', 'T_FPM_INOUTCOLLECT_LK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INOUTCOLLECT_LK_FID') CREATE INDEX IDX_INOUTCOLLECT_LK_FID ON T_FPM_INOUTCOLLECT_LK ( FID );


EXEC P_ALTERPK 'PK_T_FPM_INOUTCOLLECT_TC', 'T_FPM_INOUTCOLLECT_TC', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INOUTCOLLECT_TC_FTBILLID') CREATE INDEX IDX_INOUTCOLLECT_TC_FTBILLID ON T_FPM_INOUTCOLLECT_TC ( FTBILLID );


EXEC P_ALTERPK 'PK_T_FPM_INOUTCOLLECT_WB', 'T_FPM_INOUTCOLLECT_WB', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INOUTCOLLECT_WB_FID') CREATE INDEX IDX_INOUTCOLLECT_WB_FID ON T_FPM_INOUTCOLLECT_WB ( FID );


EXEC P_ALTERPK 'PK_T_FPM_APPROVALDISPOSE', 'T_FPM_APPROVALDISPOSE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_APPROVALDISPOSE_FBILLNO') CREATE INDEX IDX_APPROVALDISPOSE_FBILLNO ON T_FPM_APPROVALDISPOSE ( FBILLNO );


EXEC P_ALTERPK 'PK_T_FPM_APPROVAL_APPLYINFO', 'T_FPM_APPROVAL_APPLYINFO', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_APPROVAL_APPLYINFO_FID') CREATE INDEX IDX_APPROVAL_APPLYINFO_FID ON T_FPM_APPROVAL_APPLYINFO ( FID );


EXEC P_ALTERPK 'PK_T_FPM_APPROVAL_ENTRY_LK', 'T_FPM_APPROVAL_ENTRY_LK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_APPROVAL_ENTRY_LK_FENTRYID') CREATE INDEX IDX_APPROVAL_ENTRY_LK_FENTRYID ON T_FPM_APPROVAL_ENTRY_LK ( FENTRYID );


EXEC P_ALTERPK 'PK_T_FPM_APPROVALDISPOSE_LK', 'T_FPM_APPROVALDISPOSE_LK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_APPROVALDISPOSE_LK_FID') CREATE INDEX IDX_FPM_APPROVALDISPOSE_LK_FID ON T_FPM_APPROVALDISPOSE_LK ( FID );


EXEC P_ALTERPK 'PK_T_FPM_APPROVALDISPOSE_TC', 'T_FPM_APPROVALDISPOSE_TC', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_APPROVAL_TC_FTBILLID') CREATE INDEX IDX_APPROVAL_TC_FTBILLID ON T_FPM_APPROVALDISPOSE_TC ( FTBILLID );


EXEC P_ALTERPK 'PK_T_FPM_APPROVALDISPOSE_WB', 'T_FPM_APPROVALDISPOSE_WB', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_APPROVALDISPOSE_WB_FID') CREATE INDEX IDX_APPROVALDISPOSE_WB_FID ON T_FPM_APPROVALDISPOSE_WB ( FID );


EXEC P_ALTERPK 'PK_T_FPM_COLLECTLOG', 'T_FPM_COLLECTLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_COLLECTLOG_BILLNO') CREATE INDEX IDX_COLLECTLOG_BILLNO ON T_FPM_COLLECTLOG ( FBILLNO );


EXEC P_ALTERPK 'PK_T_FPM_COLLECT_EXECRECORD', 'T_FPM_COLLECT_EXECRECORD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_COLLECT_EXECRECORD_ORG') CREATE INDEX IDX_COLLECT_EXECRECORD_ORG ON T_FPM_COLLECT_EXECRECORD ( FSOURCEBILLEID );


EXEC P_ALTERPK 'PK_T_FPM_LOGGERAPPLYORG', 'T_FPM_LOGGERAPPLYORG', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_FPM_LOGGERAPPLYORG_FID') CREATE INDEX T_FPM_LOGGERAPPLYORG_FID ON T_FPM_LOGGERAPPLYORG ( FID );

