/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCCIT_ADJ_DETAIL_SJJT', 'T_TCCIT_ADJ_DETAIL_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_ADJ_DETAIL_SJJT_1') CREATE INDEX IDX_T_TCCIT_ADJ_DETAIL_SJJT_1 ON T_TCCIT_ADJ_DETAIL_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_ASS_ACCE_TOT_SJJT', 'T_TCCIT_ASS_ACCE_TOT_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_ASS_ACCE_TT_SJJT_1') CREATE INDEX IDX_TCCIT_ASS_ACCE_TT_SJJT_1 ON T_TCCIT_ASS_ACCE_TOT_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_CALC_DET_SJJT', 'T_TCCIT_CALC_DET_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_CALC_DET_SJJT_1') CREATE INDEX IDX_T_TCCIT_CALC_DET_SJJT_1 ON T_TCCIT_CALC_DET_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_DEP_DETAIL_SJJT', 'T_TCCIT_DEP_DETAIL_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_DEP_DETAIL_SJJT_1') CREATE INDEX IDX_T_TCCIT_DEP_DETAIL_SJJT_1 ON T_TCCIT_DEP_DETAIL_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_FDC_ACC_SJJT', 'T_TCCIT_FDC_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_FDC_ACC_SJJT_1') CREATE INDEX IDX_T_TCCIT_FDC_ACC_SJJT_1 ON T_TCCIT_FDC_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_FDC_MLE_SUM_SJJT', 'T_TCCIT_FDC_MLE_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_FDC_MLE_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_FDC_MLE_SUM_SJJT_1 ON T_TCCIT_FDC_MLE_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_FDC_NSTZ_SUM_SJJ', 'T_TCCIT_FDC_NSTZ_SUM_SJJ', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_FDC_NSTZ_SUM_SJJ_1') CREATE INDEX IDX_T_TCCIT_FDC_NSTZ_SUM_SJJ_1 ON T_TCCIT_FDC_NSTZ_SUM_SJJ ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_INCRED_ACC_SJJT', 'T_TCCIT_INCRED_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_INCRED_ACC_SJJT_1') CREATE INDEX IDX_T_TCCIT_INCRED_ACC_SJJT_1 ON T_TCCIT_INCRED_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_INCRED_SUM_SJJT', 'T_TCCIT_INCRED_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_INCRED_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_INCRED_SUM_SJJT_1 ON T_TCCIT_INCRED_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_JMSD_MIDD_AP_SJJT', 'T_TCCIT_JMSD_MIDD_AP_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_JMSD_MIDD_AP_SJJT_1') CREATE INDEX IDX_TCCIT_JMSD_MIDD_AP_SJJT_1 ON T_TCCIT_JMSD_MIDD_AP_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_ACC_SJJT', 'T_TCCIT_NONTAX_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_NONTAX_ACC_SJJT_1') CREATE INDEX IDX_T_TCCIT_NONTAX_ACC_SJJT_1 ON T_TCCIT_NONTAX_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_SUM_M_SJJT', 'T_TCCIT_NONTAX_SUM_M_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_NONTAX_SUM_M_SJJT1') CREATE INDEX IDX_T_TCCIT_NONTAX_SUM_M_SJJT1 ON T_TCCIT_NONTAX_SUM_M_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_SUM_SJJT', 'T_TCCIT_NONTAX_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_NONTAX_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_NONTAX_SUM_SJJT_1 ON T_TCCIT_NONTAX_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_PROFIT_SUM_SJJT', 'T_TCCIT_PROFIT_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_PROFIT_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_PROFIT_SUM_SJJT_1 ON T_TCCIT_PROFIT_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_TECH_ACC_SJJ', 'T_TCCIT_TECH_ACC_SJJ', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_TECH_ACC_SJJ_1') CREATE INDEX IDX_T_TCCIT_TECH_ACC_SJJ_1 ON T_TCCIT_TECH_ACC_SJJ ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_TECH_SUM_SJJT', 'T_TCCIT_TECH_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_TECH_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_TECH_SUM_SJJT_1 ON T_TCCIT_TECH_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_TREDUCED_ACC_SJJT', 'T_TCCIT_TREDUCED_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_TREDUCED_ACCSJJT1') CREATE INDEX IDX_T_TCCIT_TREDUCED_ACCSJJT1 ON T_TCCIT_TREDUCED_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_TREDUCED_SUM_SJJT', 'T_TCCIT_TREDUCED_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_TREDUCED_SUM_SJJT1') CREATE INDEX IDX_T_TCCIT_TREDUCED_SUM_SJJT1 ON T_TCCIT_TREDUCED_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_YJ_ASS_ACC_SJJT', 'T_TCCIT_YJ_ASS_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_YJ_ASS_ACC_SJJT_1') CREATE INDEX IDX_T_TCCIT_YJ_ASS_ACC_SJJT_1 ON T_TCCIT_YJ_ASS_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_YJ_ASS_SUM_SJJT', 'T_TCCIT_YJ_ASS_SUM_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_YJ_ASS_SUM_SJJT_1') CREATE INDEX IDX_T_TCCIT_YJ_ASS_SUM_SJJT_1 ON T_TCCIT_YJ_ASS_SUM_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_YJ_PRO_ACC_SJJT', 'T_TCCIT_YJ_PRO_ACC_SJJT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCCIT_YJ_PRO_ACC_SJJT_1') CREATE INDEX IDX_T_TCCIT_YJ_PRO_ACC_SJJT_1 ON T_TCCIT_YJ_PRO_ACC_SJJT ( FORGID ,FSKSSQQ ,FSKSSQZ );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
