liusheng
21 小时以前 e4e220916dd2a4aa649a9b0162e5b5ed0dc9d7e5
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
package com.ruoyi.web.controller.smartor;
 
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.web.component.DeptUtils;
import com.smartor.domain.PerSonWorkbenchDto;
import com.smartor.service.PersonWorkbenchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
import java.util.Map;
 
/**
 * 标签Controller
 *
 * @author ruoyi
 * @date 2023-06-06
 */
@Api(description = "个人工作台")
@RestController
@RequestMapping("/smartor/workbench")
public class PersonWorkbenchController extends BaseController {
    @Autowired
    private PersonWorkbenchService personWorkbenchService;
 
    /**
     * 当前登录用户的门诊、在院、出院病人的统计情况
     */
    @ApiOperation("当前登录用户的门诊、在院、出院病人的统计情况")
    @GetMapping("/getPatCount")
    public TableDataInfo getPatCount(@RequestParam("deptIds") String detpIds, @RequestParam("dcCodes") String dcCodes) {
        //获取当前登陆人
        Map<String, String> deptAndDocID = DeptUtils.getDeptAndDocID();
        if (StringUtils.isEmpty(detpIds)) {
            detpIds = deptAndDocID.get("deptId");
        }
        if (StringUtils.isEmpty(dcCodes)) {
            dcCodes = deptAndDocID.get("userName");
        }
 
        List<PerSonWorkbenchDto> patCount = personWorkbenchService.getPatCount(detpIds, dcCodes);
        return getDataTable(patCount);
    }
 
    /**
     * 当前登录用户的门诊、在院、出院病人的统计情况
     */
    @ApiOperation("当前登录用户的门诊、在院、出院病人的统计情况")
    //@PreAuthorize("@ss.hasPermi('system:tag:list')")
    @GetMapping("/getTaskInfo")
    public TableDataInfo getTaskInfo(@RequestParam("deptIds") String detpIds, @RequestParam("dcCodes") String dcCodes) {
        //获取当前登陆人
        Map<String, String> deptAndDocID = DeptUtils.getDeptAndDocID();
        if (StringUtils.isEmpty(detpIds)) {
            detpIds = deptAndDocID.get("deptId");
        }
        if (StringUtils.isEmpty(dcCodes)) {
            dcCodes = deptAndDocID.get("userName");
        }
 
        List<PerSonWorkbenchDto> patCount = personWorkbenchService.getPatCount(detpIds, dcCodes);
        return getDataTable(patCount);
    }
 
 
}