mitao
2025-01-26 861d0de9a80cfc5fe8edf0eb0d62e1eb7e85b427
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
package com.sinata.system.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinata.common.entity.PageDTO;
import com.sinata.system.domain.MwApplication;
import com.sinata.system.domain.SysDepartment;
import com.sinata.system.domain.dto.DisposalUnitDTO;
import com.sinata.system.domain.dto.MedicalInstitutionDTO;
import com.sinata.system.domain.dto.RegulatoryUnitDTO;
import com.sinata.system.domain.dto.SysDepartmentDTO;
import com.sinata.system.domain.query.DepartmentQuery;
import com.sinata.system.domain.vo.DisposalUnitVO;
import com.sinata.system.domain.vo.MedicalInstitutionVO;
import com.sinata.system.domain.vo.RegulatoryUnitVO;
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);
    List<SysDepartmentVO> getRegionTree1(String keyword);
    List<SysDepartmentVO> getRegionTree2(String keyword);
 
    /**
     * 当前登录用户所在区域
     *
     * @return
     */
    SysDepartment getMyDepartment();
 
    /**
     * 新增区域
     *
     * @param dto
     * @return
     */
    void addRegion(SysDepartmentDTO dto);
 
    /**
     * 编辑区域
     *
     * @param dto
     * @return
     */
    void editRegion(SysDepartmentDTO dto);
 
    /**
     * 获取树编码
     *
     * @param parentId
     * @return
     */
    String generateTreeCode(Long parentId);
 
    /**
     * 生成组织编码
     * 区域、医疗机构、处置单位、监管单位 4位 按组织类型不重复
     *
     * @param parentId
     * @param orgType
     * @return
     */
    String getOrgCode(Long parentId, Integer orgType);
 
    /**
     * 删除区域
     *
     * @param id
     */
    void deleteRegion(Long id);
 
    /**
     * 医疗机构分页列表
     *
     * @param query
     * @return
     */
    PageDTO<MedicalInstitutionVO> pageMedicalList(DepartmentQuery query);
 
    /**
     * 新增医疗机构
     *
     * @param dto
     */
    void addMedical(MedicalInstitutionDTO dto);
 
    /**
     * 编辑医疗机构
     *
     * @param dto
     * @return
     */
    void editMedical(MedicalInstitutionDTO dto);
 
    /**
     * 医疗机构详情
     *
     * @param id
     * @return
     */
    MedicalInstitutionVO getMedicalDetailById(Long id);
 
    /**
     * 根据父级区域id查询处置单位列表
     *
     * @param id
     * @return
     */
    List<DisposalUnitVO> getDisposalUnitListByParentId(Long id);
 
    /**
     * 删除医疗机构
     *
     * @param id
     */
    void deleteMedical(Long id);
 
    /**
     * 处置单位分页列表
     *
     * @param query
     * @return
     */
    PageDTO<DisposalUnitVO> pageDisposalUnitList(DepartmentQuery query);
 
    /**
     * 新增处置单位
     *
     * @param dto
     */
    void addDisposalUnit(DisposalUnitDTO dto);
 
    /**
     * 编辑医疗机构
     *
     * @param dto
     * @return
     */
    void editDisposalUnit(DisposalUnitDTO dto);
 
    /**
     * 处置单位详情
     *
     * @param id
     * @return
     */
    DisposalUnitVO getDisposalUnitDetailById(Long id);
 
    /**
     * 删除处置单位
     *
     * @param id
     */
    void deleteDisposalUnit(Long id);
 
    /**
     * 监管单位分页列表
     *
     * @param query
     * @return
     */
    PageDTO<RegulatoryUnitVO> pageRegulatoryUnitList(DepartmentQuery query);
 
    /**
     * 新增监管单位
     *
     * @param dto
     */
    void addRegulatoryUnit(RegulatoryUnitDTO dto);
 
    /**
     * 编辑监管单位
     *
     * @param dto
     */
    void editRegulatoryUnit(RegulatoryUnitDTO dto);
 
    /**
     * 监管单位详情
     *
     * @param id
     * @return
     */
    RegulatoryUnitVO getRegulatoryUnitDetailById(Long id);
 
    /**
     * 删除监管单位
     *
     * @param id
     */
    void deleteRegulatoryUnit(Long id);
 
    /**
     * 根据部门id获取树编码,如果为空则获取当前登录用户所在区域树编码
     *
     * @param departmentId
     * @return
     */
    String getTreeCodeByDepartmentId(Long departmentId);
 
    /**
     * 路线关联医院列表
     *
     * @param id
     * @return
     */
    List<MedicalInstitutionVO> getHospitalListByRouteId(Long id);
 
    /**
     * 创建机构
     *
     * @param mwApplication
     */
    void createDepartment(MwApplication mwApplication);
}