|  |  | 
 |  |  | import com.ruoyi.common.core.controller.BaseController; | 
 |  |  | import com.ruoyi.common.core.domain.AjaxResult; | 
 |  |  | import com.ruoyi.common.core.domain.entity.SysUser; | 
 |  |  | import com.ruoyi.common.core.domain.model.LoginUser; | 
 |  |  | import com.ruoyi.common.core.page.TableDataInfo; | 
 |  |  | import com.ruoyi.common.enums.BusinessType; | 
 |  |  | import com.ruoyi.common.utils.PageUtils; | 
 |  |  | 
 |  |  | import com.smartor.domain.PatMedInhosp; | 
 |  |  | import com.smartor.domain.PatMedInhospVO; | 
 |  |  | import com.smartor.domain.PatMedReq; | 
 |  |  | import com.smartor.domain.PatServiceCount; | 
 |  |  | import com.smartor.service.IPatMedInhospService; | 
 |  |  | import com.smartor.service.IPatMedOuthospService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.beans.factory.annotation.Value; | 
 |  |  | import org.springframework.util.CollectionUtils; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private IPatMedInhospService patMedInhospService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private IPatMedOuthospService iPatMedOuthospService; | 
 |  |  |  | 
 |  |  |     @Value("${visitHosp}") | 
 |  |  |     private Integer visitHosp; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询患者住院记录列表 | 
 |  |  |      */ | 
 |  |  | 
 |  |  |     @PostMapping("/selectPatMedInhospList") | 
 |  |  |     public TableDataInfo selectPatMedInhosplist(@RequestBody PatMedInhosp patMedInhosp) { | 
 |  |  |         PageUtils.startPageByPost(patMedInhosp.getPageNum(), patMedInhosp.getPageSize()); | 
 |  |  |         SysUser user = getLoginUser().getUser(); | 
 |  |  |         patMedInhosp.setOrgid(user.getOrgid()); | 
 |  |  |         List<PatMedInhosp> list = patMedInhospService.selectPatMedInhospList(patMedInhosp); | 
 |  |  |         long count = PageUtils.count(new ISelect() { | 
 |  |  |             @Override | 
 |  |  | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |         return getDataTable2(count, list); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 出院、门诊人数和随访量统计(周,月,年) | 
 |  |  |      */ | 
 |  |  |     @ApiOperation("出院、门诊人数和随访量统计(周,月,年)") | 
 |  |  |     //@PreAuthorize("@ss.hasPermi('smartor:patinhosp:list')") | 
 |  |  |     @PostMapping("/queryPersonCount") | 
 |  |  |     public TableDataInfo queryPersonCount(@RequestBody PatServiceCount patServiceCount) { | 
 |  |  |  | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |  | 
 |  |  |     @PostMapping("/selectPatMedInhospListCount") | 
 |  |  |     @ApiOperation("查询出、入院看病人次和人数") | 
 |  |  |     public AjaxResult selectPatMedInhospListCount(PatMedReq patMedReq) { | 
 |  |  |     public AjaxResult selectPatMedInhospListCount(@RequestBody PatMedReq patMedReq) { | 
 |  |  |         SysUser user = getLoginUser().getUser(); | 
 |  |  |         patMedReq.setOrgid(user.getOrgid()); | 
 |  |  |         return success(patMedInhospService.selectPatMedInhospListCount(patMedReq)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |         return getDataTable(patMedInhospService.getDocAndPat(patMedInhosp)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | //    /** | 
 |  |  | //     * 医护与患者关联关系 | 
 |  |  | //     * | 
 |  |  | //     * @return | 
 |  |  | //     */ | 
 |  |  | //    @ApiOperation("医护与患者关联关系") | 
 |  |  | //    @GetMapping("/test") | 
 |  |  | //    public void test() { | 
 |  |  | //        patMedInhospService.dealOutHospInfo(); | 
 |  |  | // | 
 |  |  | //        //门诊表 | 
 |  |  | //        if (visitHosp != 1) { | 
 |  |  | //            iPatMedOuthospService.dealOutpatientInfo(); | 
 |  |  | //        } | 
 |  |  | //    } | 
 |  |  |  | 
 |  |  | } |