zhongrj
2024-03-21 2cde81761ea06c696457f7d1341f28cee3a50dad
src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml
@@ -12,6 +12,10 @@
        select
        jtrpa.*,
        br.town_name streetName,
        case
        when TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) < 18 then 2
        when TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) >= 18 then 1
        end as minors,
        jg.grid_name,
        jda.aoi_name,
        br.village_name communityName,
@@ -26,6 +30,9 @@
            <if test="residen.minors!=null and residen.minors ==2">
                and TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) &lt; 18
            </if>
            <if test="residen.minors!=null and residen.minors ==1">
                and TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) &gt;= 18
            </if>
            <if test="residen.id != null ">and jtrpa.id = #{residen.id}</if>
            <if test="residen.name != null  and residen.name != ''">and jtrpa.name like CONCAT('%',#{residen.name},'%')</if>
            <if test="residen.phone != null  and residen.phone != ''">and jtrpa.phone like CONCAT('%',#{residen.phone},'%')</if>