mitao
2024-12-04 1c940b2c9b9cb8f8591045e5048eac8de5923a14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.sinata.system.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinata.system.domain.SysDepartment;
import com.sinata.system.domain.dto.SysDepartmentDTO;
import com.sinata.system.domain.vo.SysDepartmentVO;
 
import java.util.List;
 
/**
 * <p>
 * 区域表 服务类
 * </p>
 *
 * @author mitao
 * @since 2024-12-02
 */
public interface SysDepartmentService extends IService<SysDepartment> {
    /**
     * 获取区域树
     * @return
     */
    List<SysDepartmentVO> listByType(Integer type);
 
    /**
     * 根据父级id获取区域信息
     *
     * @param parentId
     * @return
     */
    SysDepartment getDepartmentByParentId(Long parentId);
 
    /**
     * 获取区域树
     *
     * @param keyword
     * @return
     */
    List<SysDepartmentVO> getRegionTree(String keyword);
 
    /**
     * 新增区域
     *
     * @param dto
     * @return
     */
    void addRegion(SysDepartmentDTO dto);
 
    /**
     * 编辑区域
     *
     * @param dto
     * @return
     */
    void editRegion(SysDepartmentDTO dto);
 
    /**
     * 获取树编码
     *
     * @param parentId
     * @return
     */
    String getTreeCode(Long parentId);
 
    /**
     * 生成组织编码
     * 区域、医疗机构、处置单位、监管单位 4位 按组织类型不重复
     *
     * @param parentId
     * @param orgType
     * @return
     */
    String getOrgCode(Long parentId, Integer orgType);
 
    void deleteRegion(Long id);
}