From cac8d292911a995ac388160704ca8713ea76cd55 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 28 八月 2025 14:33:25 +0800 Subject: [PATCH] 河南数据采集代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java | 62 ++++++++++++++++-------------- 1 files changed, 33 insertions(+), 29 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java index da5b443..0ae17bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java @@ -9,10 +9,7 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.smartor.domain.PatMedInhosp; -import com.smartor.domain.PatMedOuthosp; -import com.smartor.domain.PatMedReq; -import com.smartor.domain.PatMedRes; +import com.smartor.domain.*; import com.smartor.service.IHNGatherPatArchiveService; import com.smartor.service.IPatMedOuthospService; import com.smartor.service.impl.HNGatherPatArchiveServiceImpl; @@ -48,35 +45,42 @@ /** * 娌冲崡鏁版嵁閲囬泦 */ - //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')") - @PostMapping("/selectGatherList") + @PostMapping("/hnDataGather") @ApiOperation("娌冲崡鏁版嵁閲囬泦") - public Integer selectUserList(@RequestBody PatMedInhosp patMedInhosp) { -// Integer sd = ihnGatherPatArchiveService.selectDeptList(null); -// Integer su = ihnGatherPatArchiveService.selectUserList(null); -// Integer icd = ihnGatherPatArchiveService.selectIcd10List(null); + public AjaxResult hnDataGather(@RequestBody HnDataGatherVO hnDataGatherVO) { + log.info("寮�濮嬫寜澶╁悓姝ョ敤鎴锋暟鎹紝鏃堕棿鑼冨洿: {} 鍒� {}", hnDataGatherVO.getStartTime(), hnDataGatherVO.getEndTime()); + Boolean aBoolean = ihnGatherPatArchiveService.hnDataGather(hnDataGatherVO); + return AjaxResult.success(aBoolean); + } - log.info("寮�濮嬫寜澶╁悓姝ョ敤鎴锋暟鎹紝鏃堕棿鑼冨洿: {} 鍒� {}", patMedInhosp.getStartOutHospTime(), patMedInhosp.getEndOutHospTime()); + /** + * 鏌ヨ鐤剧梾鍒楄〃鏁版嵁閲囬泦 + */ + @PostMapping("/selectIcd10List") + @ApiOperation("鏌ヨ鐤剧梾鍒楄〃鏁版嵁閲囬泦") + public AjaxResult selectIcd10List(@RequestBody Icd10 icd10) { + Integer integer = ihnGatherPatArchiveService.selectIcd10List(icd10); + return AjaxResult.success(integer); + } - LocalDate startDate = patMedInhosp.getStartOutHospTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate endDate = patMedInhosp.getEndOutHospTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + /** + * 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅鏁版嵁閲囬泦 + */ + @PostMapping("/selectUserList") + @ApiOperation("鐢ㄦ埛淇℃伅闆嗗悎淇℃伅鏁版嵁閲囬泦") + public AjaxResult selectUserList(@RequestBody SysUser sysUser) { + Integer integer = ihnGatherPatArchiveService.selectUserList(sysUser); + return AjaxResult.success(integer); + } - Integer po = null; - // 寰幆澶勭悊姣忎竴澶� - for (LocalDate currentDate = startDate; !currentDate.isAfter(endDate); currentDate = currentDate.plusDays(1)) { - PatMedInhosp dailyCondition = new PatMedInhosp(); - LocalDateTime dayStart = currentDate.atStartOfDay(); - LocalDateTime dayEnd = currentDate.atTime(23, 59, 59); - dailyCondition.setStartOutHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant())); - dailyCondition.setEndOutHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant())); - Integer pi = ihnGatherPatArchiveService.selectPatMedInhospList(dailyCondition); - - PatMedOuthosp patMedOuthosp = new PatMedOuthosp(); - patMedOuthosp.setBeginTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant())); - patMedOuthosp.setEndTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant())); - po = ihnGatherPatArchiveService.selectPatMedOuthospList(patMedOuthosp); - } - return po; + /** + * 閮ㄩ棬淇℃伅闆嗗悎淇℃伅鏁版嵁閲囬泦 + */ + @PostMapping("/selectDeptList") + @ApiOperation("閮ㄩ棬淇℃伅闆嗗悎淇℃伅鏁版嵁閲囬泦") + public AjaxResult selectDeptList(@RequestBody SysDept sysDept) { + Integer integer = ihnGatherPatArchiveService.selectDeptList(sysDept); + return AjaxResult.success(integer); } } -- Gitblit v1.9.3