From 01cf8140ee6ea6a98ff12d5ef973b050fbf75bf1 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Sat, 16 Mar 2024 15:23:02 +0800
Subject: [PATCH] 场所添加字段+从业人员添加字段
---
src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
index c2d3332..728410d 100644
--- a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
+++ b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
@@ -34,6 +34,49 @@
<if test="rotation.regionCode!=null and rotation.regionCode!=''">
and jr.community_code like concat('%',#{rotation.regionCode},'%')
</if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="rotation.roleName != null and rotation.roleName != ''">
+ <if test="rotation.roleName=='wgy'">
+ <choose>
+ <when test="gridCodeList !=null and gridCodeList !=''">
+ and jr.type = 2
+ and jr.community_code REGEXP #{gridCodeList}
+ </when>
+ <otherwise>
+ and jr.type = 2
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="rotation.roleName=='mj'">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList!=''">
+ and jr.type = 1
+ and jr.community_code REGEXP #{regionChildCodesList}
+ </when>
+ <otherwise>
+ and jr.type = 1
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="rotation.roleName=='inhabitant'">
+ and jr.type = 3
+ </if>
+ </when>
+ <otherwise>
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList!=''">
+ and jr.community_code REGEXP #{regionChildCodesList}
+ </when>
+ <otherwise>
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </otherwise>
+ </choose>
+ </if>
</select>
--
Gitblit v1.9.3