zhongrj
2024-03-16 06a876a72a266f34360e42c53750845d6267569b
从业人员查询统计修改(年龄无显示问题)
1 files modified
8 ■■■■ changed files
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
@@ -10,7 +10,7 @@
        jpp.name,
        jpp.telephone,
        jpp.temp_address,
        TIMESTAMPDIFF(YEAR, DATE_FORMAT(jpp.id_card, '%Y%m%d%'), CURDATE()) as age,
        TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) as age,
        jpp.gender,
        jpp.id_card,
        jp.place_name employer,
@@ -62,7 +62,7 @@
            <if test="placePractitioner.ethnicity != null ">and jpp.ethnicity = #{placePractitioner.ethnicity}</if>
            <if test="placePractitioner.type == 1">
                and TIMESTAMPDIFF(YEAR, DATE_FORMAT(jpp.id_card, '%Y%m%d%'), CURDATE()) &lt; 18
                and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) &lt; 18
                and jc.category_no in (180202,180201)
            </if>
            <if test="placePractitioner.type == 2">
@@ -70,7 +70,7 @@
                and jc.category_no in (180202,180201)
            </if>
            <if test="placePractitioner.type == 3">
                and (TIMESTAMPDIFF(YEAR, DATE_FORMAT(jpp.id_card, '%Y%m%d%'), CURDATE()) &lt; 18  or jpp.ethnicity != 1)
                and (TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) &lt; 18  or jpp.ethnicity != 1)
                and jc.category_no in (180202,180201)
            </if>
            and jpp.is_deleted = 0
@@ -132,7 +132,7 @@
        LEFT JOIN jczz_category jc on jc.category_no = jppl.poi_code
        <where>
            <if test="placePractitioner.type == 1">
                and (TIMESTAMPDIFF(YEAR, DATE_FORMAT(jpp.id_card, '%Y%m%d%'), CURDATE()) &lt; 18 or jpp.ethnicity != 1)
                and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) &lt; 18
                and jc.category_no in (180202,180201)
            </if>
            <if test="placePractitioner.type == 2">