linwei
2024-02-22 7bcd0d2d7510cb2ba67099cd768e1b2b6d047dc2
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
@@ -151,8 +151,44 @@
            LEFT JOIN jczz_property_district_user jpdu ON jpcd.id = jpdu.property_company_district_id
            LEFT JOIN blade_user bu ON locate(jpdu.user_id,bu.id)>0 and bu.is_deleted = 0
        WHERE jpc.is_deleted = 0
        and bu.real_name is not null
        and jpc.id = #{propertyCompany.id}
    </select>
    <select id="getDetailVO" resultType="org.springblade.modules.property.vo.PropertyCompanyDetailVO">
        SELECT
            jpc.*
        FROM
            jczz_property_company jpc
        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>