Fix Bug #550: AI修复

This commit is contained in:
2026-05-27 03:00:08 +08:00
parent 8e6cb5c79f
commit 16c42ca108
5433 changed files with 171 additions and 778731 deletions

View File

@@ -1,42 +0,0 @@
package com.openhis.web.system.controller;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
import com.openhis.web.dto.HomeStatisticsDto;
import com.openhis.web.service.IHomeStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 系统首页控制器
*/
@Api(tags = "系统首页")
@RestController
@RequestMapping("/system/home")
@AllArgsConstructor
public class HomeController {
private final IDoctorStationEmrAppService doctorStationEmrAppService;
private final IHomeStatisticsService homeStatisticsService;
@ApiOperation("获取首页统计数据")
@GetMapping("/statistics")
public R<?> getStatistics() {
// 获取基础统计数据
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
// 获取待写病历数量
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null);
// 将待写病历数量添加到统计数据中
statisticsDto.setPendingEmr((Integer) pendingEmrCount.getData());
return R.ok(statisticsDto);
}
}