create view vi_lc_rent_plan10 as (
SELECT LCF.ID                                                                                                                               AS ID,
       LBC.PROJECT_ID                                                                                                                       AS PROJECT_ID,
       LBC.ID                                                                                                                               AS CONTRACT_ID,
       LCCS.PLAN_STATUS                                                                                                                     AS CONTRACT_STATUS,
       LBC.CONTRACT_NUMBER                                                                                                                  AS CONTRACT_NUMBER,
       (LCF.RENT - (ifnull(LCFD.RENT, 0) + ifnull(LCFI.RENT, 0)))                                                                           AS RENT_OVER,
       (LCF.CORPUS - (((ifnull(LCFD.CORPUS, 0) + ifnull(LCFI.CORPUS, 0)) + ifnull(LCFD.CORPUS_ADJUST, 0)) +
                      ifnull(LCFI.CORPUS_ADJUST, 0)))                                                                                       AS CORPUS_OVER,
       (LCF.INTEREST - (((ifnull(LCFD.INTEREST, 0) + ifnull(LCFI.INTEREST, 0)) + ifnull(LCFD.INTEREST_ADJUST, 0)) +
                        ifnull(LCFI.INTEREST_ADJUST, 0)))                                                                                   AS INTEREST_OVER
FROM (((((APZL.LC_RENT_PLAN LCF LEFT JOIN APZL.LB_CONTRACT_INFO LBC ON ((LCF.CONTRACT_ID = LBC.ID))) LEFT JOIN APZL.LC_CALC_CONDITION_STATUS LCCS ON ((LCCS.PAYMENT_NUMBER = LCF.PAYMENT_NUMBER))) LEFT JOIN APZL.LB_UNION_LESSEE_TRANSFER LBU ON ((LCF.CONTRACT_ID = LBU.CONTRACT_ID))) LEFT JOIN APZL.LC_RENT_INCOME_TRANSFER LCFD ON (((LCF.PAYMENT_NUMBER = LCFD.PAYMENT_NUMBER) AND (LCF.PLAN_LIST = LCFD.PLAN_LIST))))
LEFT JOIN APZL.LC_RENT_INCOME_TEMP_TRANSFER LCFI ON (((LCF.PAYMENT_NUMBER = LCFI.PAYMENT_NUMBER) AND (LCF.PLAN_LIST = LCFI.PLAN_LIST)))));

-- comment on column vi_lc_rent_plan10.id not supported: 标识

-- comment on column vi_lc_rent_plan10.project_id not supported: 项目编号

-- comment on column vi_lc_rent_plan10.contract_id not supported: 编号

-- comment on column vi_lc_rent_plan10.contract_status not supported: 状态

-- comment on column vi_lc_rent_plan10.contract_number not supported: 业务合同号

