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); + } }