create view vi_personandcompany_info as SELECT (CASE WHEN (CI.CUSTOMERTYPE = '03') THEN CP.FULLNAME ELSE CC.COMPANY_NAME END)   AS FULLNAME,
       (CASE WHEN (CI.CUSTOMERTYPE = '03') THEN CP.CERTID ELSE CC.CERTID END)           AS CERTID,
       (CASE WHEN (CI.CUSTOMERTYPE = '03') THEN CP.NATIVEPLACE ELSE CC.REG_ADDRESS END) AS ADDRESS,
       LPI.ID                                                                           AS PROJECTID,
       LCI.ID                                                                           AS CONTRACTID
FROM (((((APZL.LB_PROJECT_INFO LPI LEFT JOIN APZL.LB_UNION_LESSEE LUL ON ((convert(LUL.PROJECT_ID USING UTF8) = LPI.ID))) LEFT JOIN APZL.CUSTOMER_INFO CI ON ((CI.CUSTOMERID = LUL.CUSTOMER_ID))) LEFT JOIN APZL.CUSTOMER_PERSON CP ON ((CP.CUSTOMERID = LUL.CUSTOMER_ID))) LEFT JOIN APZL.CUSTOMER_COMPANY CC ON ((LUL.CUSTOMER_ID = CC.CUSTOMERID)))
LEFT JOIN APZL.LB_CONTRACT_INFO LCI ON ((convert(LCI.PROJECT_ID USING UTF8) = LPI.ID)));

-- comment on column vi_personandcompany_info.projectId not supported: 标识

-- comment on column vi_personandcompany_info.contractId not supported: 编号

