医院废弃物信息化管理平台
“mitao”
2025-12-25 0242c8ae596f44427cd23d38f637bf987a4de0bf
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
package cn.besteam.modules.medical.controller;
 
import cn.besteam.common.api.vo.Result;
import cn.besteam.common.aspect.annotation.AutoLog;
import cn.besteam.common.dto.IdDTO;
import cn.besteam.modules.medical.dto.MwNoticeDTO;
import cn.besteam.modules.medical.entity.MwNotice;
import cn.besteam.modules.medical.service.IMwNoticeService;
import cn.besteam.modules.medical.vo.MwNoticeVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
/**
 * 公告消息
 */
@RestController
@RequestMapping("/medical/mwNotice")
@Slf4j
@Api(description = "公告消息")
public class MwNoticeController {
 
    @Autowired
    IMwNoticeService mwNoticeService;
 
    /**
     * 分页列表查询
     *
     * @param pageNo
     * @param pageSize
     * @return
     */
    @GetMapping(value = "/list")
    @ApiOperation(value = "获取公告消息数据列表", notes = "获取公告消息数据列表", produces = "application/json")
    public Result<IPage<MwNoticeVO>> queryPageList(MwNoticeDTO mwNoticeDTO, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
 
        IPage<MwNoticeVO> pageList = mwNoticeService.queryPageList(pageNo,pageSize,mwNoticeDTO);
 
        return Result.ok(pageList);
    }
 
    /**
     * 添加
     *
     * @param mwNotice
     * @return
     */
    @PostMapping(value = "/add")
    @AutoLog(value = "添加公告消息")
    @ApiOperation(value = "添加公告消息", notes = "添加公告消息", produces = "application/json")
    public Result<Boolean> add(/*@RequestBody */MwNotice mwNotice,MultipartFile file) {
        mwNotice.setFiles(file);
        return Result.ok(mwNoticeService.add(mwNotice));
    }
 
    /**
     * 编辑
     *
     * @param mwNotice
     * @return
     */
    @PostMapping(value = "/edit")
    @AutoLog(value = "编辑公告消息")
    @ApiOperation(value = "编辑公告消息", notes = "编辑公告消息", produces = "application/json")
    public Result<Boolean> edit(@RequestBody MwNotice mwNotice) {
 
        return Result.ok(mwNoticeService.edit(mwNotice));
    }
 
    /**
     * 设置已读状态
     *
     * @param
     * @return
     */
    @PostMapping(value = "/readReceipt")
    @AutoLog(value = "设置已读状态")
    @ApiOperation(value = "设置已读状态", notes = "设置已读状态", produces = "application/json")
    public Result<Boolean> readReceipt(@Validated @RequestBody IdDTO dto) {
 
        return Result.ok(mwNoticeService.readReceipt(dto.getId()));
    }
 
 
    /**
     * 通过id删除
     *
     * @param dto
     * @return
     */
    @PostMapping(value = "/delete")
    @AutoLog(value = "删除公告消息")
    @ApiOperation(value = "删除公告消息", notes = "删除公告消息", produces = "application/json")
    public Result<Boolean> delete(@Validated @RequestBody IdDTO dto) {
 
        return Result.ok(mwNoticeService.delete(dto.getId()));
    }
 
 
}