From 8a881a2c54673d4223425f17bc5cae8eef4e5649 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 22 Mar 2024 17:26:43 +0800
Subject: [PATCH] 反诈宣传和反诈预警查询调整
---
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index 4223c16..c92e61d 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -192,6 +192,10 @@
jhs.building,
jhs.district_code aoiCode,
jh.volunteer_org,
+ case
+ when TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) < 18 then 2
+ when TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) >= 18 then 1
+ end as minors,
jhs.unit
FROM
jczz_household jh
@@ -246,6 +250,9 @@
<if test="household.minors!=null and household.minors ==2">
and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) < 18
</if>
+ <if test="household.minors!=null and household.minors ==1">
+ and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) >= 18
+ </if>
</if>
<!-- 不等于18 就是非租户 -->
<if test="household.relationship!=null and household.relationship != 18">
--
Gitblit v1.9.3