linwei
2024-01-12 87c81cb045fb89a74901613405e6c4ccf4bd03bd
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -828,17 +828,20 @@
            <if test="household.aoiCode!=null and household.aoiCode!=''">
                and jhs.district_code = #{household.aoiCode}
            </if>
            AND EXISTS (
            SELECT
            *
            and jh.id in (
            SELECT DISTINCT
            juhl.household_id
            FROM
            jczz_user_house_label juhl
            LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
            WHERE
            juhl.lable_type = 1
            AND jl.id = #{household.labelId}
            AND jl.parent_id = #{household.parentId}
            AND juhl.household_id = jh.id
            <if test="household.labelId != null ">
                AND jl.id = #{household.labelId}
            </if>
            <if test="household.parentId != null ">
                AND jl.parent_id = #{household.parentId}
            </if>
            AND juhl.label_id IS NOT NULL
            )
            and jh.is_deleted = 0
@@ -854,7 +857,8 @@
        and juhl.lable_type = 1
        and juhl.color = '#30D17C'
        and jh.id in (
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=30
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
        create_time )=30
        )
        <choose>
            <when test="list!=null and list.size()>0">
@@ -875,7 +879,8 @@
        and juhl.lable_type = 1
        and juhl.color = '#FFB42B'
        and jh.id in (
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=14
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
        create_time )=14
        )
        <choose>
            <when test="list!=null and list.size()>0">
@@ -897,7 +902,8 @@
        and juhl.lable_type = 1
        and juhl.color = '#EA1F1F'
        and jh.id in (
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=7
        select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
        create_time )=7
        )
        <choose>
            <when test="list!=null and list.size()>0">