From b24e8f50b8d7a915b3d802f32a61a966b5a08328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Thu, 3 Apr 2025 16:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=80=E5=B1=9E=E6=9C=BA=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=B0=86=E6=95=B0=E6=8D=AE=E6=BA=90=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E4=B8=BA=E6=9C=BA=E6=9E=84=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysDataSourceController.java | 15 +++++++++++++-- .../modules/system/entity/SysDataSource.java | 6 ++++++ .../system/mapper/SysDataSourceMapper.java | 5 +++++ .../system/mapper/xml/SysDataSourceMapper.xml | 11 +++++++++++ .../system/service/ISysDataSourceService.java | 9 +++++++++ .../service/impl/SysDataSourceServiceImpl.java | 11 +++++++++++ 6 files changed, 55 insertions(+), 2 deletions(-) diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDataSourceController.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDataSourceController.java index 0f67223..e6a4f67 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDataSourceController.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDataSourceController.java @@ -48,7 +48,6 @@ public class SysDataSourceController extends JeecgController> departList(@RequestParam(name = "addFLag") String addFLag) { + return this.sysDataSourceService.queryDepartList(addFLag); + } } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDataSource.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDataSource.java index 76c0e80..40c990e 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDataSource.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDataSource.java @@ -1,6 +1,7 @@ package org.jeecg.modules.system.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -116,8 +117,13 @@ public class SysDataSource { */ @Excel(name = "所属部门", width = 15) @ApiModelProperty(value = "所属部门") + @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "org_code") private java.lang.String sysOrgCode; + @TableField(exist = false) + @ApiModelProperty(value = "所属部门") + private java.lang.String departName; + /**租户ID*/ @ApiModelProperty(value = "租户ID") private java.lang.Integer tenantId; diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDataSourceMapper.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDataSourceMapper.java index 260bf41..7ffca2d 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDataSourceMapper.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDataSourceMapper.java @@ -2,6 +2,9 @@ package org.jeecg.modules.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.modules.system.entity.SysDataSource; +import org.springframework.data.repository.query.Param; + +import java.util.List; /** * @Description: 多数据源管理 @@ -11,4 +14,6 @@ import org.jeecg.modules.system.entity.SysDataSource; */ public interface SysDataSourceMapper extends BaseMapper { + List queryDepartList(@Param("addFLag") String addFLag); + } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDataSourceMapper.xml b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDataSourceMapper.xml index 4c3864f..73f2cb6 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDataSourceMapper.xml +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDataSourceMapper.xml @@ -2,4 +2,15 @@ + + diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDataSourceService.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDataSourceService.java index eab243c..a38723e 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDataSourceService.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDataSourceService.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.system.entity.SysDataSource; +import java.util.List; + /** * @Description: 多数据源管理 * @Author: jeecg-boot @@ -33,4 +35,11 @@ public interface ISysDataSourceService extends IService { * @return */ Result deleteDataSource(String id); + + /** + * 机构列表查询 + * @param addFLag + * @return + */ + Result> queryDepartList(String addFLag); } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDataSourceServiceImpl.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDataSourceServiceImpl.java index d0853c5..0d96fcd 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDataSourceServiceImpl.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDataSourceServiceImpl.java @@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.sql.DataSource; +import java.util.List; /** * @Description: 多数据源管理 @@ -128,4 +129,14 @@ public class SysDataSourceServiceImpl extends ServiceImpl> queryDepartList(String addFLag) { + List list = baseMapper.queryDepartList(addFLag); + return Result.OK(list); + } }