chengf
2025-12-10 ee89a5cfa50980f1f2f2fa84bb69741b161670b5
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -111,7 +111,8 @@
    <!-- 查询小区信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityInfo" parameterType="Map" resultType="Map">
        select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd,s.state, s.take_time
        select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd,
        s.state, s.take_time, s.out_time,s.community_code,s.community_code communityCode
        from s_community s
        where 1=1
        <if test="statusCd != null and statusCd != ''">
@@ -210,8 +211,14 @@
        <if test="tel != null and tel != ''">
            ,s.tel = #{tel}
        </if>
        <if test="communityCode !=null and communityCode != ''">
            , t.community_code= #{communityCode}
        </if>
        <if test="takeTime !=null and takeTime != ''">
            , t.take_time= #{takeTime}
        </if>
        <if test="outTime !=null and outTime != ''">
            , t.out_time= #{outTime}
        </if>
        <if test="communityArea != null and communityArea != ''">
            ,s.community_area = #{communityArea}
@@ -338,7 +345,7 @@
        <if test="needCommunityInfo == true">
            and sc.`community_id` = ms.`community_id`
            AND sc.`status_cd` = '0'
            and sc.state='1100'
            and sc.state in ('1100','1400')
        </if>
        <if test="statusCd != null and statusCd != ''">
            and ms.status_cd = #{statusCd}
@@ -421,7 +428,7 @@
        <if test="needCommunityInfo == true">
            and sc.`community_id` = ms.`community_id`
            AND sc.`status_cd` = '0'
            and sc.state='1100'
            and sc.state in ('1100','1400')
        </if>
        <if test="statusCd != null and statusCd != ''">
            and ms.status_cd = #{statusCd}
@@ -477,7 +484,242 @@
        t.map_x,t.map_x mapX,t.state,td.name stateName,ca.area_code areaCode,ca.area_name areaName,
        ca.parent_area_code parentAreaCode,ca.parent_area_name parentAreaName,
        t.community_area communityArea,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.fee_price,t.fee_price
        feePrice,t.qr_code qrCode,t.create_time createTime,s.name storeName,s.store_id storeId, t.take_time, t.take_time takeTime
        feePrice,t.qr_code qrCode,t.create_time createTime,s.name storeName,s.store_id storeId, t.take_time, t.take_time takeTime,t.out_time outTime
        from s_community t
        left join city_area ca on t.city_code = ca.area_code and ca.status_cd = '0'
        left join s_community_member cm on t.community_id = cm.community_id and cm.member_type_cd = '390001200002' and cm.status_cd = '0'
        left join s_store s on cm.member_id = s.store_id and s.status_cd = '0'
        left join t_dict td on t.state = td.status_cd and td.table_name = 's_community' and td.table_columns = 'state'
        where t.status_cd = '0'
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
            and t.nearby_landmarks= #{nearbyLandmarks}
        </if>
        <if test="cityCode !=null and cityCode != ''">
            and t.city_code= #{cityCode}
        </if>
        <if test="name !=null and name != ''">
            and t.name like concat('%',#{name},'%')
        </if>
        <!--<if test="nameLike !=null and nameLike != ''">
            and t.name like concat('%',#{nameLike},'%')
        </if>-->
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityIds !=null">
            and t.community_id in
            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
        <if test="mapY !=null and mapY != ''">
            and t.map_y= #{mapY}
        </if>
        <if test="mapX !=null and mapX != ''">
            and t.map_x= #{mapX}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="memberId !=null and memberId !=''">
            and cm.community_id = t.community_id
            and cm.member_id = #{memberId}
            and cm.status_cd = '0'
        </if>
        <if test="memberId !=null and memberId !='' and auditStatusCd != null and auditStatusCd !=''">
            and cm.audit_status_cd = #{auditStatusCd}
        </if>
        <if test="notInCommunityId != null ">
            and t.community_id not in
            <foreach collection="notInCommunityId" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <!--group by t.community_id-->
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 查询小区信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityInfoNewMessage" parameterType="Map" resultType="Map">
        select t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,
        t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,t.tel,t.community_code, t.community_code communityCode,
        t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY,
        t.map_x,t.map_x mapX,t.state,td.name stateName,ca.area_code areaCode,ca.area_name areaName,
        ca.parent_area_code parentAreaCode,ca.parent_area_name parentAreaName,
        t.community_area communityArea,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.fee_price,t.fee_price
        feePrice,t.qr_code qrCode,t.create_time createTime,s.name storeName,s.store_id storeId, t.take_time, t.take_time takeTime,t.out_time outTime,
        t.project_address_province,
        t.project_address_province projectAddressProvince,
        t.project_address_city,
        t.project_address_city projectAddressCity,
        t.project_address_district,
        t.project_address_district projectAddressDistrict,
        t.project_address_town,
        t.project_address_town projectAddressTown,
        t.project_address_road,
        t.project_address_road projectAddressRoad,
        t.house_completion_date,
        t.house_completion_date houseCompletionDate,
        t.project_nature,
        t.project_nature projectNature,
        t.project_type,
        t.project_type projectType,
        t.project_land_area,
        t.project_land_area projectLandArea,
        t.total_construction_area,
        t.total_construction_area totalConstructionArea,
        t.chargeable_total_area,
        t.chargeable_total_area chargeableTotalArea,
        t.chargeable_area_multilayer,
        t.chargeable_area_multilayer chargeableAreaMultilayer,
        t.chargeable_area_high_rise1,
        t.chargeable_area_high_rise1 chargeableAreaHighRise1,
        t.chargeable_area_high_rise_up,
        t.chargeable_area_high_rise_up chargeableAreaHighRiseUp,
        t.chargeable_area_shop,
        t.chargeable_area_shop chargeableAreaShop,
        t.chargeable_area_villa,
        t.chargeable_area_villa chargeableAreaVilla,
        t.chargeable_area_office,
        t.chargeable_area_office chargeableAreaOffice,
        t.chargeable_area_commercial_house,
        t.chargeable_area_commercial_house chargeableAreaCommercialHouse,
        t.green_area,
        t.green_area greenArea,
        t.area_details,
        t.area_details areaDetails,
        t.property_management_address,
        t.property_management_address propertyManagementAddress,
        t.property_manager_name,
        t.property_manager_name propertyManagerName,
        t.property_manager_phone,
        t.property_manager_phone propertyManagerPhone,
        t.day_repair_phone,
        t.day_repair_phone dayRepairPhone,
        t.night_repair_phone,
        t.night_repair_phone nightRepairPhone,
        t.project_manager,
        t.project_manager projectManager,
        t.has_manager_certificate,
        t.has_manager_certificate hasManagerCertificate,
        t.certificate_name,
        t.certificate_name certificateName,
        t.manager_certificate_no,
        t.manager_certificate_no managerCertificateNo,
        t.manager_phone,
        t.manager_phone managerPhone,
        t.neighborhood_committee_name,
        t.neighborhood_committee_name neighborhoodCommitteeName,
        t.neighborhood_committee_address,
        t.neighborhood_committee_address neighborhoodCommitteeAddress,
        t.neighborhood_secretary,
        t.neighborhood_secretary neighborhoodSecretary,
        t.neighborhood_office_phone,
        t.neighborhood_office_phone neighborhoodOfficePhone,
        t.secretary_phone,
        t.secretary_phone secretaryPhone,
        t.owners_committee_address,
        t.owners_committee_address ownersCommitteeAddress,
        t.owners_committee_chairman,
        t.owners_committee_chairman ownersCommitteeChairman,
        t.chairman_phone,
        t.chairman_phone chairmanPhone,
        t.fire_hydrant_count,
        t.fire_hydrant_count fireHydrantCount,
        t.fire_channel_count,
        t.fire_channel_count fireChannelCount,
        t.water_tank_count,
        t.water_tank_count waterTankCount,
        t.reservoir_count,
        t.reservoir_count reservoirCount,
        t.total_motor_vehicle_spaces,
        t.total_motor_vehicle_spaces totalMotorVehicleSpaces,
        t.ground_motor_vehicle_spaces,
        t.ground_motor_vehicle_spaces groundMotorVehicleSpaces,
        t.underground_motor_vehicle_spaces,
        t.underground_motor_vehicle_spaces undergroundMotorVehicleSpaces,
        t.new_energy_charging_piles,
        t.new_energy_charging_piles newEnergyChargingPiles,
        t.non_motor_vehicle_charging_points,
        t.non_motor_vehicle_charging_points nonMotorVehicleChargingPoints,
        t.ground_non_motor_vehicle_area,
        t.ground_non_motor_vehicle_area groundNonMotorVehicleArea,
        t.underground_non_motor_vehicle_area,
        t.underground_non_motor_vehicle_area undergroundNonMotorVehicleArea,
        t.clubhouse_area,
        t.clubhouse_area clubhouseArea,
        t.has_decoration_rubbish_point,
        t.has_decoration_rubbish_point hasDecorationRubbishPoint,
        t.security_entrance_count,
        t.security_entrance_count securityEntranceCount,
        t.elevator_count,
        t.elevator_count elevatorCount,
        t.elevator_type,
        t.elevator_type elevatorType,
        t.elevator_install_date,
        t.elevator_install_date elevatorInstallDate,
        t.elevator_service_life,
        t.elevator_service_life elevatorServiceLife,
        t.elevator_brand1,
        t.elevator_brand1 elevatorBrand1,
        t.elevator_brand2,
        t.elevator_brand2 elevatorBrand2,
        t.monitor_count,
        t.monitor_count monitorCount,
        t.monitor_maintenance_company,
        t.monitor_maintenance_company monitorMaintenanceCompany,
        t.barrier_gate_count,
        t.barrier_gate_count barrierGateCount,
        t.barrier_gate_brand,
        t.barrier_gate_brand barrierGateBrand,
        t.barrier_supplier_contact,
        t.barrier_supplier_contact barrierSupplierContact,
        t.barrier_supplier_phone,
        t.barrier_supplier_phone barrierSupplierPhone,
        t.water_pump_count,
        t.water_pump_count waterPumpCount,
        t.ground_parking_spaces,
        t.ground_parking_spaces groundParkingSpaces,
        t.underground_parking_spaces,
        t.underground_parking_spaces undergroundParkingSpaces,
        t.ground_non_mechanical_fee,
        t.ground_non_mechanical_fee groundNonMechanicalFee,
        t.garage_non_mechanical_fee,
        t.garage_non_mechanical_fee garageNonMechanicalFee,
        t.temporary_hourly_fee,
        t.temporary_hourly_fee temporaryHourlyFee,
        t.temporary_daily_fee,
        t.temporary_daily_fee temporaryDailyFee,
        t.temporary_per_time_fee,
        t.temporary_per_time_fee temporaryPerTimeFee,
        t.total_building_count,
        t.total_building_count totalBuildingCount,
        t.building_unit_count,
        t.building_unit_count buildingUnitCount,
        t.high_rise_building_count,
        t.high_rise_building_count highRiseBuildingCount,
        t.multilayer_villa_building_count,
        t.multilayer_villa_building_count multilayerVillaBuildingCount,
        t.residential_household_count,
        t.residential_household_count residentialHouseholdCount,
        t.shop_household_count,
        t.shop_household_count shopHouseholdCount
        from s_community t
        left join city_area ca on t.city_code = ca.area_code and ca.status_cd = '0'
        left join s_community_member cm on t.community_id = cm.community_id and cm.member_type_cd = '390001200002' and cm.status_cd = '0'
@@ -628,7 +870,8 @@
        ca1.parent_area_name provName,
        sc.community_area communityArea,
        sc.qr_code qrCode,
        sc.take_time takeTime
        sc.take_time takeTime,
        sc.out_time outTime
        FROM
        s_community sc,
        s_community_member scm,