医院园区科室联动
This commit is contained in:
parent
578bbd54f1
commit
7f01dca60f
@ -43,8 +43,14 @@ public class AgencyController extends BaseController {
|
||||
}
|
||||
|
||||
@GetMapping("/selectAgencyList")
|
||||
public AjaxResult agencyList(Agency agency) {
|
||||
return AjaxResult.success(agencyService.selectAgencyList(agency));
|
||||
public AjaxResult selectAgencyByIdList(Agency agency) {
|
||||
return agencyService.selectAgencyByIdList(agency);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/subordinateAgencyList")
|
||||
public AjaxResult subordinateAgencyList(Agency agency) {
|
||||
return agencyService.subordinateAgencyList(agency);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -49,6 +49,11 @@ public class DepartmentController extends BaseController {
|
||||
return AjaxResult.success(departmentService.selectDepartmentList(department));
|
||||
}
|
||||
|
||||
@GetMapping("/selectDepartmentList")
|
||||
public AjaxResult selectDepartmentByAgencyIdList(Department department) {
|
||||
return departmentService.selectDepartmentByAgencyIdList(department);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出科室信息列表
|
||||
*/
|
||||
|
||||
@ -31,6 +31,22 @@ public interface IAgencyService {
|
||||
*/
|
||||
List<Agency> selectAgencyList(Agency agency);
|
||||
|
||||
/**
|
||||
* 查询机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息集合
|
||||
*/
|
||||
AjaxResult selectAgencyByIdList(Agency agency);
|
||||
|
||||
/**
|
||||
* 查询机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息集合
|
||||
*/
|
||||
AjaxResult subordinateAgencyList(Agency agency);
|
||||
|
||||
/**
|
||||
* 新增机构信息
|
||||
*
|
||||
|
||||
@ -20,10 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -78,6 +75,33 @@ public class AgencyServiceImpl implements IAgencyService {
|
||||
return agencyMapper.selectAgencyList(agency);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectAgencyByIdList(Agency agency) {
|
||||
return AjaxResult.success(agencyMapper.selectAgencyList(agency));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult subordinateAgencyList(Agency agency) {
|
||||
if (Objects.isNull(agency) || Objects.isNull(agency.getParentId())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.success(agencyMapper.selectAgencyList(agency));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增机构信息
|
||||
*
|
||||
|
||||
@ -32,6 +32,14 @@ public interface IDepartmentService {
|
||||
*/
|
||||
List<Department> selectDepartmentList(Department department);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 科室信息集合
|
||||
*/
|
||||
AjaxResult selectDepartmentByAgencyIdList(Department department);
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*
|
||||
|
||||
@ -61,6 +61,21 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
return departmentMapper.selectDepartmentList(department);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 科室信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectDepartmentByAgencyIdList(Department department) {
|
||||
if (Objects.isNull(department) || (Objects.isNull(department.getAgencyId()) && Objects.isNull(department.getParentDepartmentId()))) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.success(departmentMapper.selectDepartmentList(department));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*
|
||||
@ -69,7 +84,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
*/
|
||||
@Override
|
||||
public int insertDepartment(Department department) {
|
||||
if (Objects.isNull(department.getParentDepartmentId())){
|
||||
if (Objects.isNull(department.getParentDepartmentId())) {
|
||||
department.setParentDepartmentId(0L);
|
||||
}
|
||||
department.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user