门诊医生排班->科室名称管理后端接口,前端基础页面
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package com.openhis.web.appointmentmanage.appservice;
|
||||
import com.core.common.core.domain.R;
|
||||
public interface IDeptAppService {
|
||||
|
||||
R<?> getDeptList();
|
||||
|
||||
R<?> searchDept(Integer pageNo, Integer pageSize, String orgName, String deptName);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.openhis.web.appointmentmanage.appservice.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.Dept;
|
||||
import com.openhis.administration.service.IDeptService;
|
||||
import com.openhis.web.appointmentmanage.appservice.IDeptAppService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DeptAppServiceImpl implements IDeptAppService {
|
||||
|
||||
@Resource
|
||||
private IDeptService deptService;
|
||||
|
||||
@Override
|
||||
public R<?> getDeptList() {
|
||||
List<Dept> list = deptService.list();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchDept(Integer pageNo, Integer pageSize, String orgName, String deptName) {
|
||||
LambdaQueryWrapper<Dept> wrapper = new LambdaQueryWrapper<>();
|
||||
if (orgName != null && ObjectUtil.isNotEmpty(orgName)) {
|
||||
wrapper.eq(Dept::getOrgName, orgName);
|
||||
}
|
||||
if (deptName != null && ObjectUtil.isNotEmpty(deptName)) {
|
||||
wrapper.eq(Dept::getDeptName, deptName);
|
||||
}
|
||||
List<Dept> list = deptService.list(wrapper);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.openhis.web.appointmentmanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.appointmentmanage.appservice.IDeptAppService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/dept")
|
||||
public class DeptController {
|
||||
|
||||
@Resource
|
||||
private IDeptAppService deptAppService;
|
||||
|
||||
/*
|
||||
* 获取科室列表
|
||||
*
|
||||
* */
|
||||
@GetMapping("/list")
|
||||
public R<?> getDeptList(){
|
||||
return R.ok(deptAppService.getDeptList());
|
||||
}
|
||||
|
||||
/*
|
||||
* 查询科室
|
||||
*
|
||||
* */
|
||||
@GetMapping("/search")
|
||||
public R<?> searchDept(
|
||||
@RequestParam(required = false) Integer pageNo,
|
||||
@RequestParam(required = false) Integer pageSize,
|
||||
@RequestParam(required = false)String orgName,
|
||||
@RequestParam(required = false)String deptName
|
||||
){
|
||||
return R.ok(deptAppService.searchDept(pageNo,pageSize,orgName,deptName));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.openhis.web.appointmentmanage.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DeptAppMapper {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 科室Entity实体
|
||||
*
|
||||
* @date 2025-12-08
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "adm_dept_info")
|
||||
@Accessors(chain = true)
|
||||
public class Dept {
|
||||
/** id */
|
||||
private Integer id;
|
||||
|
||||
/** 关联租户的租户名称 */
|
||||
private String orgName;
|
||||
|
||||
/** 科室名称 */
|
||||
private String deptName;
|
||||
|
||||
/** 启用状态 */
|
||||
private Boolean status;
|
||||
|
||||
/** 预约取消限制 */
|
||||
private Integer cancelLimit;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.Dept;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DeptMapper extends BaseMapper<Dept> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Dept;
|
||||
|
||||
public interface IDeptService extends IService<Dept> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Dept;
|
||||
import com.openhis.administration.mapper.DeptMapper;
|
||||
import com.openhis.administration.service.IDeptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DeptImpl extends ServiceImpl<DeptMapper, Dept> implements IDeptService {
|
||||
}
|
||||
Reference in New Issue
Block a user