医院废弃物信息化管理平台
“mitao”
2025-12-24 3763145f34d7706923d55edc32f5cfbc8bc08b92
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
package cn.besteam.modules.system.controller;
 
import cn.besteam.common.api.vo.Result;
import cn.besteam.common.aspect.annotation.AutoLog;
import cn.besteam.modules.system.vo.SysDepartmentOfficeVO;
import cn.besteam.modules.system.service.ISysDepartmentService;
import cn.besteam.modules.system.dto.SysDepartmentOfficeQueryDTO;
import cn.besteam.modules.system.dto.SysDepartmentOfficeUpdateDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
/**
 * @Description: 科室管理Controller
 * @author: besteam
 * @date: 2024-01-01
 * @version: V1.0
 */
@RestController
@RequestMapping("/system/office")
@Slf4j
@Api(tags = "【0729迭代】科室管理")
public class SysDepartmentOfficeController {
 
    @Autowired
    private ISysDepartmentService sysDepartmentService;
 
    /**
     * 科室列表分页查询
     *
     * @param queryVO  查询条件
     * @return 科室列表
     */
    @GetMapping(value = "/list")
    @ApiOperation(value = "科室列表分页查询", notes = "获取科室列表数据,支持医院选择和科室名称模糊查询")
    public Result<IPage<SysDepartmentOfficeVO>> queryPageList(
            @ApiParam(value = "查询条件") SysDepartmentOfficeQueryDTO queryVO) {
 
        IPage<SysDepartmentOfficeVO> pageList = sysDepartmentService.queryOfficePageList(queryVO);
        return Result.ok(pageList);
    }
 
    /**
     * 编辑科室信息
     *
     * @param updateVO 更新数据
     * @return 操作结果
     */
    @PostMapping(value = "/edit")
    @AutoLog(value = "编辑科室信息")
    @ApiOperation(value = "编辑科室信息", notes = "可修改科室名称、科室位置、床位数和产废阈值")
    public Result<?> edit(@Validated @RequestBody SysDepartmentOfficeUpdateDTO updateVO) {
 
        boolean success = sysDepartmentService.updateOfficeInfo(updateVO);
        if (success) {
            return Result.ok("修改成功!");
        } else {
            return Result.error("修改失败!");
        }
    }
 
}