This commit is contained in:
abing
2025-06-13 11:39:43 +08:00
parent b79b9f8b50
commit 437bf23f09
1468 changed files with 14808 additions and 132509 deletions

View File

@@ -38,7 +38,6 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>42.3.1</scope>
</dependency>
</dependencies>

View File

@@ -37,6 +37,16 @@ public interface SysDictDataMapper {
*/
public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public SysDictData selectDictInfo(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
/**
* 根据字典数据ID查询信息
*

View File

@@ -1,21 +1,25 @@
package com.core.system.mapper;
import java.util.List;
import java.util.Map;
import com.core.common.core.domain.model.LoginUserExtend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.core.common.core.domain.entity.SysUser;
import com.core.common.core.domain.model.LoginUserExtend;
/**
* 用户表 数据层
*
*
* @author system
*/
public interface SysUserMapper {
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
/**
* 根据条件分页查询用户列表
*
*
* @param sysUser 用户信息
* @return 用户信息集合信息
*/
@@ -23,7 +27,7 @@ public interface SysUserMapper {
/**
* 根据条件分页查询已配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
@@ -31,7 +35,7 @@ public interface SysUserMapper {
/**
* 根据条件分页查询未分配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
@@ -39,7 +43,7 @@ public interface SysUserMapper {
/**
* 通过用户名查询用户
*
*
* @param userName 用户名
* @return 用户对象信息
*/
@@ -47,7 +51,7 @@ public interface SysUserMapper {
/**
* 通过用户ID查询用户
*
*
* @param userId 用户ID
* @return 用户对象信息
*/
@@ -55,7 +59,7 @@ public interface SysUserMapper {
/**
* 新增用户信息
*
*
* @param user 用户信息
* @return 结果
*/
@@ -63,7 +67,7 @@ public interface SysUserMapper {
/**
* 修改用户信息
*
*
* @param user 用户信息
* @return 结果
*/
@@ -71,7 +75,7 @@ public interface SysUserMapper {
/**
* 修改用户头像
*
*
* @param userName 用户名
* @param avatar 头像地址
* @return 结果
@@ -80,7 +84,7 @@ public interface SysUserMapper {
/**
* 重置用户密码
*
*
* @param userName 用户名
* @param password 密码
* @return 结果
@@ -89,7 +93,7 @@ public interface SysUserMapper {
/**
* 通过用户ID删除用户
*
*
* @param userId 用户ID
* @return 结果
*/
@@ -97,7 +101,7 @@ public interface SysUserMapper {
/**
* 批量删除用户信息
*
*
* @param userIds 需要删除的用户ID
* @return 结果
*/
@@ -105,7 +109,7 @@ public interface SysUserMapper {
/**
* 校验用户名称是否唯一
*
*
* @param userName 用户名称
* @return 结果
*/
@@ -134,4 +138,21 @@ public interface SysUserMapper {
* @return 扩展属性
*/
LoginUserExtend getLoginUserExtend(@Param("userId") Long userId);
/**
* 通过科室id获取医院id
*
* @param orgId 科室id
* @return 医院id
*/
Long getHospitalIdByOrgId(@Param("orgId") Long orgId);
/**
* 查询 option集合
*
* @param tenantId 租户id
* @return option集合
*/
List<Map<String, String>> getOptionList(@Param("tenantId") Integer tenantId);
}

View File

@@ -27,6 +27,15 @@ public interface ISysDictDataService {
*/
public String selectDictLabel(String dictType, String dictValue);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public SysDictData selectDictInfo(String dictType, String dictValue);
/**
* 根据字典数据ID查询信息
*

View File

@@ -1,6 +1,8 @@
package com.core.system.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.core.common.core.domain.entity.SysUser;
import com.core.common.core.domain.model.LoginUserExtend;
@@ -212,4 +214,20 @@ public interface ISysUserService {
* @return 扩展属性
*/
LoginUserExtend getLoginUserExtend(Long userId);
/**
* 通过科室id获取医院id
*
* @param orgId 科室id
* @return 医院id
*/
Long getHospitalIdByOrgId(Long orgId);
/**
* 查询 option集合
*
* @param tenantId 租户id
* @return option集合
*/
List<Map<String,String>> getOptionList(Integer tenantId);
}

View File

@@ -42,6 +42,17 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
public String selectDictLabel(String dictType, String dictValue) {
return dictDataMapper.selectDictLabel(dictType, dictValue);
}
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
@Override
public SysDictData selectDictInfo(String dictType, String dictValue) {
return dictDataMapper.selectDictInfo(dictType, dictValue);
}
/**
* 根据字典数据ID查询信息

View File

@@ -1,7 +1,9 @@
package com.core.system.service.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.validation.Validator;
@@ -497,4 +499,26 @@ public class SysUserServiceImpl implements ISysUserService {
return userMapper.getLoginUserExtend(userId);
}
/**
* 通过科室id获取医院id
*
* @param orgId 科室id
* @return 医院id
*/
@Override
public Long getHospitalIdByOrgId(Long orgId){
return userMapper.getHospitalIdByOrgId(orgId);
}
/**
* 查询 option集合
*
* @param tenantId 租户id
* @return option集合
*/
@Override
public List<Map<String,String>> getOptionList(Integer tenantId){
return userMapper.getOptionList(tenantId);
}
}

View File

@@ -64,6 +64,12 @@
and dict_value = #{dictValue}
</select>
<select id="selectDictInfo" parameterType="String" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where dict_type = #{dictType}
and dict_value = #{dictValue}
</select>
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where dict_code = #{dictCode}

View File

@@ -267,10 +267,40 @@
<select id="getLoginUserExtend" resultType="com.core.common.core.domain.model.LoginUserExtend">
SELECT T1.ID AS practitioner_id,
T1.org_id AS org_id
T1.org_id AS org_id,
T2.NAME AS org_name
FROM adm_practitioner AS T1
LEFT JOIN adm_organization AS T2 ON T2.ID = T1.org_id
WHERE T1.delete_flag = '0'
AND T1.user_id = #{userId} LIMIT 1
</select>
<select id="getHospitalIdByOrgId" resultType="long">
SELECT CASE
WHEN
ao.type_enum = 1 THEN
ao.ID
ELSE (SELECT parent.ID
FROM adm_organization AS parent
WHERE parent.bus_no = SUBSTRING(ao.bus_no FROM '^[^.]+') LIMIT 1 )
END
AS result_id
FROM
adm_organization AS ao
WHERE
ao.ID =
#{orgId}
</select>
<select id="getOptionList" resultType="map">
SELECT
option_key AS optionkey,
option_value AS optionvalue
FROM
sys_option
WHERE
delete_flag = '0'
AND tenant_id = #{tenantId}
</select>
</mapper>