医院废弃物信息化管理平台
“mitao”
2026-01-14 ce8e86e7045a6eadc2f06d3cd1af90d22b04fdd0
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
package cn.besteam.modules.medical.controller;
 
import cn.besteam.common.api.vo.Result;
import cn.besteam.modules.medical.dto.MwServicePeriodDTO;
import cn.besteam.modules.medical.dto.MwServicePeriodEditDTO;
import cn.besteam.modules.medical.dto.RenewOrderRequestVO;
import cn.besteam.modules.medical.service.IMwServicePeriodService;
import cn.besteam.modules.system.entity.SysUser;
import cn.besteam.modules.system.service.ISysUserService;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
/**
* 服务期管理
* @author pzb
* @Date 2022/7/13 20:03
*/
@RestController
@RequestMapping("/medical/mwServicePeriod")
@Slf4j
@Api(description = "服务期管理")
public class MwServicePeriodController {
 
    @Autowired
    private IMwServicePeriodService mwServicePeriodService;
 
    @Autowired
    private ISysUserService sysUserService;
 
 
    /**
     * 获取服务期管理列表
     * @param dto
     * @return
     */
    @GetMapping(value = "/getServicePeriodList")
    @ApiOperation(value = "获取服务期管理列表", notes = "获取服务期管理列表", produces = "application/json")
    public Result<?> getServicePeriodList(MwServicePeriodDTO dto){
        return Result.ok(mwServicePeriodService.getServicePeriodList(dto));
    }
 
 
    /**
     * 获取服务期管理编辑页面内容
     * @param id
     * @return
     */
    @RequestMapping(value = "/getServicePeriodInfo", method = RequestMethod.GET)
    @ApiOperation(value = "获取服务期管理编辑页面内容", notes = "获取服务期管理编辑页面内容", produces = "application/json")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "数据id", name = "id", required = true, dataType = "int", paramType = "form")
    })
    public Result<?> getServicePeriodInfo(Integer id){
        return Result.ok(mwServicePeriodService.getServicePeriodInfo(id));
    }
 
 
    /**
     * 获取服务期管理编辑历史数据
     * @param id
     * @return
     */
    @RequestMapping(value = "/getServicePeriodHistoryRecord", method = RequestMethod.GET)
    @ApiOperation(value = "获取服务期管理编辑历史数据", notes = "获取服务期管理编辑历史数据", produces = "application/json")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "数据id", name = "id", required = true, dataType = "int", paramType = "form")
    })
    public Result<?> getServicePeriodHistoryRecord(Integer id){
        return Result.ok(mwServicePeriodService.getServicePeriodHistoryRecord(id));
    }
 
 
    /**
     * 编辑服务期管理数据
     * @param dto
     * @param request
     * @return
     */
    @GetMapping(value = "/editServicePeriod")
    @ApiOperation(value = "编辑服务期管理数据", notes = "编辑服务期管理数据", produces = "application/json")
    public Result editServicePeriod(MwServicePeriodEditDTO dto, HttpServletRequest request){
        String token = sysUserService.getToken(request);
        SysUser user = sysUserService.getByToken(token);
        mwServicePeriodService.editServicePeriod(dto, user.getId());
        return Result.ok(new JSONObject());
    }
 
 
    /**
     * 导出服务期管理数据
     * @param dto
     * @param response
     */
    @GetMapping(value = "/exportServicePeriodList")
    @ApiOperation(value = "导出服务期管理数据", notes = "导出服务期管理数据", produces = "application/json")
    public void exportServicePeriodList(MwServicePeriodDTO dto, HttpServletResponse response){
        try {
            mwServicePeriodService.exportServicePeriodList(dto, response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
 
    /**
     * 获取续费订单列表数据
     * @param vo
     * @param pageNo
     * @param pageSize
     * @return
     */
    @GetMapping(value = "/getRenewOrderList")
    @ApiOperation(value = "获取续费订单列表数据", notes = "获取续费订单列表数据", produces = "application/json")
    public Result<?> getRenewOrderList(RenewOrderRequestVO vo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
        return Result.ok(mwServicePeriodService.getRenewOrderList(vo, pageNo, pageSize));
    }
 
 
    /**
     * 导出续费订单列表数据
     * @param vo
     * @param response
     */
    @GetMapping(value = "/exportRenewOrder")
    @ApiOperation(value = "导出续费订单列表数据", notes = "导出续费订单列表数据", produces = "application/json")
    public void exportRenewOrder(RenewOrderRequestVO vo, HttpServletResponse response){
        try {
            mwServicePeriodService.exportRenewOrder(vo, response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
 
    @GetMapping(value = "/getRenewOrderOne")
    @ApiOperation(value = "获取续费订单单条数据", notes = "获取续费订单单条数据", produces = "application/json")
    public Result<?> getRenewOrderOne(Integer id){
        return Result.ok(mwServicePeriodService.getRenewOrderOne(id));
    }
 
 
    /**
     * 获取开票地址
     * @param id
     * @return
     */
    @RequestMapping(value = "/getBillingAddress", method = RequestMethod.GET)
    @ApiOperation(value = "获取开票地址", notes = "获取开票地址", produces = "application/json")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "数据id", name = "id", required = true, dataType = "int", paramType = "form")
    })
    public Result<?> getBillingAddress(Integer id){
        return Result.ok(mwServicePeriodService.getBillingAddress(id));
    }
}