陈昶聿
14 小时以前 6a53d35b5d56e2f6bc64bbfe41579f6f32039c90
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
@@ -1,15 +1,27 @@
package com.ruoyi.web.controller.smartor;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.AddOrgId;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.PageUtils;
import com.smartor.domain.PatArchiveOthreInfo;
import com.smartor.domain.PatMedReq;
import com.smartor.domain.PatMedRes;
import io.netty.util.internal.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -46,20 +58,31 @@
     * 查询患者门诊记录列表
     */
    //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/selectPatMedOuthospList")
    @ApiOperation("查询患者门诊记录列表")
    public TableDataInfo selectPatMedOuthosplist(@RequestBody PatMedOuthosp patMedOuthosp) {
        startPage();
    public Map<String, Object> selectPatMedOuthosplist(@RequestBody PatMedOuthosp patMedOuthosp) {
        patMedOuthosp.setPageNum(PageUtils.getOffset(patMedOuthosp.getPageNum(), patMedOuthosp.getPageSize()));
        SysUser user = getLoginUser().getUser();
        patMedOuthosp.setOrgid(user.getOrgid());
        List<PatMedOuthosp> list = patMedOuthospService.selectPatMedOuthospList(patMedOuthosp);
        return getDataTable(list);
        patMedOuthosp.setPageNum(null);
        patMedOuthosp.setPageSize(null);
        List<PatMedOuthosp> patMedOuthosps = patMedOuthospService.selectPatMedOuthospList(patMedOuthosp);
        Integer count = 0;
        if (CollectionUtils.isNotEmpty(patMedOuthosps)) count = patMedOuthosps.size();
        return getDataTable3(count, list);
    }
    /**
     * 查询患者门诊记录列表
     */
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/selectPatMedOuthospCount")
    @ApiOperation("查询门诊看病人次和人数")
    public AjaxResult selectPatMedOuthospCount(@RequestBody PatMedReq patMedReq) {
        SysUser user = getLoginUser().getUser();
        patMedReq.setOrgid(user.getOrgid());
        PatMedRes patMedRes = patMedOuthospService.selectPatMedOuthospCount(patMedReq);
        return success(patMedRes);
    }
@@ -83,16 +106,16 @@
        util.exportExcel(response, list, "患者门诊记录数据");
    }
    /**
     * 获取患者门诊记录详细信息
     */
    @ApiOperation("获取患者门诊记录详细信息")
    @ApiImplicitParam(name = "getInfo", value = "主键ID", dataType = "long", dataTypeClass = Long.class)
    //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:query')")
    @GetMapping(value = "getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(patMedOuthospService.selectPatMedOuthospById(id));
    }
//    /**
//     * 获取患者门诊记录详细信息
//     */
//    @ApiOperation("获取患者门诊记录详细信息")
//    @ApiImplicitParam(name = "getInfo", value = "主键ID", dataType = "long", dataTypeClass = Long.class)
//    //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:query')")
//    @GetMapping(value = "getInfo/{id}")
//    public AjaxResult getInfo(@PathVariable("id") Long id) {
//        return success(patMedOuthospService.selectPatMedOuthospById(id));
//    }
    /**
     * 新增患者门诊记录
@@ -100,6 +123,7 @@
    @ApiOperation("新增患者门诊记录")
    //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:add')")
    @Log(title = "患者门诊记录", businessType = BusinessType.INSERT)
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatMedOuthosp patMedOuthosp) {
        SysUser user = getLoginUser().getUser();
@@ -113,6 +137,7 @@
    @ApiOperation("修改患者门诊记录")
    //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:edit')")
    @Log(title = "患者门诊记录", businessType = BusinessType.UPDATE)
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody PatMedOuthosp patMedOuthosp) {
        return toAjax(patMedOuthospService.updatePatMedOuthosp(patMedOuthosp));