guoshilong
2024-02-19 7c62754ee030d811c04d74fd1e2c951ff6be29e3
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
@@ -155,5 +155,45 @@
        and jpc.id = #{propertyCompany.id}
    </select>
    <select id="getDetailVO" resultType="org.springblade.modules.property.vo.PropertyCompanyDetailVO">
        SELECT
            jpc.*,
            jpcd.principal,
            jpcd.principal_phone AS principalPhone,
            jpdu.id AS cid
        FROM
            jczz_property_company jpc
                LEFT JOIN jczz_property_company_district jpcd ON jpcd.property_company_id = jpc.id and jpcd.is_deleted = 0
                LEFT JOIN jczz_property_district_user jpdu ON jpcd.id = jpdu.property_company_district_id
        WHERE jpc.is_deleted = 0
          and jpc.id = #{propertyCompany.id}
    </select>
    <select id="getPropertyDistrictInfo" resultType="org.springblade.modules.property.vo.PropertyDistrictInfo">
    SELECT
        house.house_code as houseId,
        house.house_name as houseName,
        house.area as houseArea,
        district.name as districtName,
        district.id as districtId,
        company.id as id,
        company.dept_id as deptId,
        company.name as propertyCompanyName,
        charge.unit_price as unitPrice,
        charge.calculation_formula as payCalculationFormula,
        bdb.dict_value as payCalculationFormulaName
    FROM jczz_house house
    LEFT JOIN jczz_district district ON district.aoi_code = house.district_code
    LEFT JOIN jczz_property_charge charge ON charge.district_id = district.id
    LEFT JOIN jczz_property_company company ON company.dept_id = charge.property_id
    LEFT JOIN blade_dict_biz bdb ON bdb.dict_key = charge.pay_type
    WHERE house.is_deleted = 0 and bdb.code = 'payCalculationFormula'
    <if test="info.houseId != null and info.houseId !=''">
        AND house.house_code = #{info.houseId}
    </if>
    </select>
</mapper>